83% wpx-shortcodes-manager-light

Code Review | WPX Shortcodes Manager Light

WordPress plugin WPX Shortcodes Manager Light scored83%from 54 tests.

About plugin

  • Plugin page: wpx-shortcodes-ma...
  • Plugin version: 2.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Jan 12, 2015
  • Latest release: Sep 7, 2021
  • Number of updates: 33
  • Update frequency: every 73.6 days
  • Top authors: gfazioli (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▼9.45ms] Passed 4 tests

A check of server-side resources used by WPX Shortcodes Manager Light
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5544.02 ▲1.02
Dashboard /wp-admin3.84 ▲0.4951.41 ▼10.98
Posts /wp-admin/edit.php3.89 ▲0.5347.61 ▼4.00
Add New Post /wp-admin/post-new.php6.36 ▲0.4783.70 ▼23.84
Media Library /wp-admin/upload.php3.76 ▲0.5339.39 ▲5.63
Manage /wp-admin/admin.php?page=wpxsm_menu3.9643.53
Settings /wp-admin/admin.php?page=wpxshortcodesmanagerlight_13.9135.52

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 135 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
wpx_shortcodes_manager_light_slug
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WPX Shortcodes Manager Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.82 ▲0.521.81 ▲0.0644.42 ▲1.30
Dashboard /wp-admin2,233 ▲484.84 ▼0.00111.70 ▲7.7842.39 ▼3.99
Posts /wp-admin/edit.php2,116 ▲242.01 ▲0.0134.22 ▼6.2433.81 ▼1.74
Add New Post /wp-admin/post-new.php1,555 ▲2223.42 ▲0.30685.96 ▲64.1065.20 ▲12.29
Media Library /wp-admin/upload.php1,418 ▲304.20 ▼0.07103.88 ▲4.7345.60 ▲1.00
Manage /wp-admin/admin.php?page=wpxsm_menu1,2901.7030.7438.41
Settings /wp-admin/admin.php?page=wpxshortcodesmanagerlight_18392.0623.5140.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • wpx_shortcodes_manager_light_slug

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\WPBones\\Foundation\\Plugin' not found in wp-content/plugins/wpx-shortcodes-manager-light/bootstrap/plugin.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-shortcodes-manager-light/vendor/wpbones/pure-css-switch/src/Html/HtmlTagSwitchButton.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'WPXShortcodesManagerLight\\WPBones\\Contracts\\Container\\Container' not found in wp-content/plugins/wpx-shortcodes-manager-light/vendor/wpbones/wpbones/src/Container/Container.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-shortcodes-manager-light/vendor/wpbones/wpbones/src/Html/HtmlTagFieldSet.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\WPBones\\Foundation\\WordPressAjaxServiceProvider' not found in wp-content/plugins/wpx-shortcodes-manager-light/plugin/Ajax/WPXShortcodesManagerLightAjax.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\Http\\Controllers\\Controller' not found in wp-content/plugins/wpx-shortcodes-manager-light/plugin/Http/Controllers/Dashboard/DashboardController.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\WPBones\\Html\\HtmlTagInput' not found in wp-content/plugins/wpx-shortcodes-manager-light/vendor/wpbones/wpbones/src/Html/HtmlTagCheckbox.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\Models\\Shortcode' not found in wp-content/plugins/wpx-shortcodes-manager-light/plugin/activation.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-shortcodes-manager-light/vendor/wpbones/wpbones/src/Html/HtmlTagDatetime.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXShortcodesManagerLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-shortcodes-manager-light/vendor/wpbones/wpbones/src/Html/HtmlTagInput.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: editor, shortcodes

wpx-shortcodes-manager-light/index.php 77% from 13 tests

The principal PHP file in "WPX Shortcodes Manager Light" v. 2.3.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpx-shortcodes-manager-light.php" instead of "index.php")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("localization")
  • Domain Path: Please prefix the domain path with a forward slash character ("/localization")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin6,927 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
PHP721,3652,3855,045
CSS111112495
Markdown71650387
LESS55618360
JSON500272
PO File294108246
JavaScript32525122

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.36
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces25
Interfaces2
Traits0
Classes48
▷ Abstract classes1020.83%
▷ Concrete classes3879.17%
▷ Final classes410.53%
Methods297
▷ Static methods6020.20%
▷ Public methods23378.45%
▷ Protected methods5217.51%
▷ Private methods124.04%
Functions19
▷ Named functions1368.42%
▷ Anonymous functions631.58%
Constants19
▷ Global constants210.53%
▷ Class constants1789.47%
▷ Public constants17100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 1.22MB with 0.90MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-6.png114.24KB27.48KB▼ 75.94%
assets/screenshot-1.png92.22KB24.36KB▼ 73.59%
assets/screenshot-3.png302.30KB82.77KB▼ 72.62%
assets/screenshot-4.png225.98KB60.33KB▼ 73.30%
assets/screenshot-5.png259.35KB70.79KB▼ 72.70%