78% content-planner

Code Review | Content Planner

WordPress plugin Content Planner scored78%from 54 tests.

About plugin

  • Plugin page: content-planner
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Dec 20, 2012
  • Latest release: Dec 20, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bookchiq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,020 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.45ms] Passed 4 tests

This is a short check of server-side resources used by Content Planner
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.90 ▲1.40
Dashboard /wp-admin3.38 ▲0.0349.21 ▼7.68
Posts /wp-admin/edit.php3.50 ▲0.1445.55 ▼2.40
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.16 ▼17.11
Media Library /wp-admin/upload.php3.30 ▲0.0738.27 ▲4.78
Content Planner /wp-admin/options-general.php?page=nhp_theme_options2.057.87
Install Plugins /wp-admin/plugins.php?page=install-required-plugins2.057.28

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 448 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
wpm_cp

Browser metrics Passed 4 tests

Checking browser requirements for Content Planner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲16513.43 ▼1.129.81 ▲8.1443.15 ▲2.81
Dashboard /wp-admin2,230 ▲495.52 ▼0.2085.08 ▼11.2044.49 ▲2.88
Posts /wp-admin/edit.php2,144 ▲442.07 ▲0.1034.91 ▼2.1943.37 ▲5.14
Add New Post /wp-admin/post-new.php1,558 ▲3223.34 ▲0.01687.74 ▲22.9857.80 ▼0.25
Media Library /wp-admin/upload.php1,446 ▲464.17 ▼0.04110.85 ▲6.9151.24 ▲5.91
Content Planner /wp-admin/options-general.php?page=nhp_theme_options9582.3435.4536.74
Install Plugins /wp-admin/plugins.php?page=install-required-plugins9392.0526.5535.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • wpm_cp
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=install-required-plugins
    • > Warning in wp-content/plugins/content-planner/classes/class-tgm-plugin-activation.php+1977
    Declaration of TGM_Bulk_Installer_Skin::before() should be compatible with Bulk_Upgrader_Skin::before($title = '')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=install-required-plugins
    • > Warning in wp-content/plugins/content-planner/classes/class-tgm-plugin-activation.php+1999
    Declaration of TGM_Bulk_Installer_Skin::after() should be compatible with Bulk_Upgrader_Skin::after($title = '')
    • > GET request to /wp-admin/plugins.php?page=install-required-plugins
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/plugins.php?page=install-required-plugins
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
The following issues need your attention
  • 51× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/validation/html_custom/validation_html_custom.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/fields/select/field_select.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/content-planner/classes/cmb/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/fields/text/field_text.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/fields/editor/field_editor.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/fields/pages_select/field_pages_select.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/fields/menu_location_select/field_menu_location_select.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/validation/str_replace/validation_str_replace.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/fields/divide/field_divide.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/content-planner/classes/options/fields/tags_multi_select/field_tags_multi_select.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (A sample of the content list) image not found
You can take inspiration from this readme.txt

content-planner/content-planner.php 92% from 13 tests

"Content Planner" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Git Repository: Please remove the Git repository from this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin6,192 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP511,5902,1784,442
CSS51141931,291
JavaScript139883350
Markdown2290109

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity16.54
▷ Minimum class complexity1.00
▷ Maximum class complexity184.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes00.00%
▷ Concrete classes52100.00%
▷ Final classes00.00%
Methods200
▷ Static methods42.00%
▷ Public methods19497.00%
▷ Protected methods63.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
375 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
classes/options/img/glyphicons/glyphicons_254_fishes.png0.30KB0.33KB0.00%
classes/options/img/glyphicons/glyphicons_082_roundabout.png0.36KB0.35KB▼ 4.83%
classes/options/img/glyphicons/glyphicons_173_play.png0.16KB0.19KB0.00%
classes/options/img/glyphicons/glyphicons_135_inbox_out.png0.27KB0.30KB0.00%
classes/options/img/glyphicons/glyphicons_061_keynote.png0.27KB0.30KB0.00%