72% content-manager-light

Code Review | Content Manager Light

WordPress plugin Content Manager Light scored72%from 54 tests.

About plugin

  • Plugin page: content-manager-l...
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Jan 27, 2014
  • Latest release: May 7, 2022
  • Number of updates: 40
  • Update frequency: every 75.7 days
  • Top authors: OTWthemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /24,910 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.79MB] [CPU: ▲6.88ms] Passed 4 tests

Server-side resources used by Content Manager Light
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.30 ▲1.8455.63 ▲19.23
Dashboard /wp-admin5.15 ▲1.8461.13 ▲7.32
Posts /wp-admin/edit.php5.21 ▲1.8667.35 ▲13.68
Add New Post /wp-admin/post-new.php7.58 ▲1.6994.79 ▼10.05
Media Library /wp-admin/upload.php5.04 ▲1.8151.33 ▲16.55
otwfcr /wp-admin/admin.php?page=otwfcr5.0253.03
Settings /wp-admin/admin.php?page=otw-lcm-settings5.0347.38
License Manager /wp-admin/admin.php?page=otw-lcm-lm5.12192.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 161 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Content Manager Light
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,200 ▲43918.60 ▲4.238.06 ▲6.2636.86 ▼1.13
Dashboard /wp-admin2,480 ▲3008.11 ▲2.46161.65 ▲68.6698.32 ▲51.38
Posts /wp-admin/edit.php2,559 ▲4565.90 ▲3.89119.00 ▲76.1542.59 ▲4.47
Add New Post /wp-admin/post-new.php6,598 ▲5,07026.24 ▲3.24961.59 ▲322.7747.52 ▼0.66
Media Library /wp-admin/upload.php1,860 ▲4667.72 ▲3.54174.03 ▲70.3289.67 ▲47.66
otwfcr /wp-admin/admin.php?page=otwfcr1,2505.58107.2826.77
Settings /wp-admin/admin.php?page=otw-lcm-settings1,3765.5998.2942.48
License Manager /wp-admin/admin.php?page=otw-lcm-lm1,3885.45105.1330.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=otw-lcm-lm
    • > Deprecated in wp-content/plugins/content-manager-light/include/otw_components/otw_functions/otw_functions.php+272
    Function get_magic_quotes_gpc() is deprecated

SRP 0% 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 items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/content-manager-light/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-mailhide.php
    • > /wp-content/plugins/content-manager-light/include/otw_components/otw_factory/views/action_message.php
  • 24× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-manager-light/include/otw_labels/otw_lcm_factory_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Shortcodes' not found in wp-content/plugins/content-manager-light/include/otw_components/otw_shortcode/shortcodes/otw_shortcode_html_editor.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/content-manager-light/include/otw_components/otw_shortcode/otw_shortcode.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/content-manager-light/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-captcha.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Shortcodes' not found in wp-content/plugins/content-manager-light/include/otw_components/otw_shortcode/shortcodes/otw_shortcode_ordered_list.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/content-manager-light/otw_content_manager.php:11
    • > PHP Notice
      Undefined variable: return_url in wp-content/plugins/content-manager-light/include/otw_components/otw_factory/views/action_message.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-manager-light/include/otw_labels/otw_lcm_grid_manager_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Shortcodes' not found in wp-content/plugins/content-manager-light/include/otw_components/otw_shortcode/shortcodes/otw_shortcode_info_box.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Shortcodes' not found in wp-content/plugins/content-manager-light/include/otw_components/otw_shortcode/shortcodes/otw_shortcode_button.class.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (OTW Grid Manager Light), #2 (Content items settings interface), #3 (Buttons), #4 (Info box), #5 (Drop Caps), #6 (Quotes), #7 (Tab Layout), #8 (Content Toggle), #9 (Dividers)
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

content-manager-light/otw_content_manager.php 92% from 13 tests

The principal PHP file in "Content Manager Light" v. 3.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("content-manager-light.php" instead of "otw_content_manager.php")

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
Good job! No executable or dangerous file extensions detected21,983 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
CSS187483149,898
PHP382,1141,2036,627
JavaScript177901482,749
SVG4002,709

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity47.28
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods230
▷ Static methods229.57%
▷ Public methods19183.04%
▷ Protected methods2711.74%
▷ Private methods125.22%
Functions49
▷ Named functions49100.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
52 compressed PNG files occupy 0.63MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/otw_components/otw_grid_manager_light/img/gm-add-big.png0.47KB0.71KB0.00%
include/otw_components/otw_grid_manager_light/img/gm-clone.png0.21KB0.24KB0.00%
include/otw_components/otw_form/img/select.png0.20KB0.27KB0.00%
include/otw_components/otw_form/img/colorpicker/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%
include/otw_components/otw_form/img/colorpicker/colorpicker_hsb_h.png0.99KB0.77KB▼ 21.94%