10% contentbox

Code Review | ContentBox

WordPress plugin ContentBox scored10%from 54 tests.

About plugin

  • Plugin page: contentbox
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9
  • WordPress version: 6.3.1
  • First release: Jul 6, 2017
  • Latest release: Aug 8, 2018
  • Number of updates: 14
  • Update frequency: every 28.4 days
  • Top authors: saiprex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /847 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Contentbox::plugin_activation() should not be called statically

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.87ms] Passed 4 tests

An overview of server-side resources used by ContentBox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.53 ▼7.29
Dashboard /wp-admin3.40 ▲0.0553.33 ▼9.42
Posts /wp-admin/edit.php3.51 ▲0.1654.84 ▲3.27
Add New Post /wp-admin/post-new.php5.98 ▲0.1092.83 ▼14.12
Media Library /wp-admin/upload.php3.32 ▲0.0938.07 ▼0.63
contentBox /wp-admin/options-general.php?page=wp-contentbox/settings3.3040.38

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for ContentBox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.48 ▼0.271.98 ▼1.1544.59 ▼1.80
Dashboard /wp-admin2,228 ▲254.80 ▼0.10103.18 ▼17.0338.68 ▼5.79
Posts /wp-admin/edit.php2,104 ▲72.13 ▲0.1337.00 ▼3.5231.31 ▼7.29
Add New Post /wp-admin/post-new.php6,245 ▲4,71226.24 ▲3.08877.74 ▲175.7175.08 ▲9.62
Media Library /wp-admin/upload.php1,407 ▲74.25 ▼0.0898.42 ▼23.5345.36 ▼7.09
contentBox /wp-admin/options-general.php?page=wp-contentbox/settings8972.0529.2029.49

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Contentbox::plugin_deactivation() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/contentbox/contentbox.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: post, text, contentbox, content, copyright...

contentbox/contentbox.php 92% from 13 tests

The main file in "ContentBox" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin559 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6142123559

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.33
▷ Minimum class complexity2.00
▷ Maximum class complexity31.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods46
▷ Static methods2963.04%
▷ Public methods4597.83%
▷ Protected methods12.17%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin