78% zmplugin

Code Review | ZMPlugin

WordPress plugin ZMPlugin scored78%from 54 tests.

About plugin

  • Plugin page: zmplugin
  • Plugin version: 1.0.27
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 3, 2023
  • Latest release: Nov 19, 2023
  • Number of updates: 6
  • Update frequency: every 58.5 days
  • Top authors: zuestmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /276 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.83MB] [CPU: ▲7.40ms] Passed 4 tests

A check of server-side resources used by ZMPlugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4744.22 ▲5.22
Dashboard /wp-admin4.25 ▲0.9553.24 ▲5.54
Posts /wp-admin/edit.php4.31 ▲0.9559.04 ▲12.47
Add New Post /wp-admin/post-new.php7.11 ▲1.2297.75 ▲6.35
Media Library /wp-admin/upload.php4.18 ▲0.9544.74 ▲14.24
Dashboard /wp-admin/admin.php?page=zmplugin4.1538.93
Settings /wp-admin/admin.php?page=zmplugin-settings4.1636.81

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 326 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
zmplugin-settings_sanitize
zmplugin-settings_int
theysaidso_admin_options
db_upgraded
can_compress_scripts
zmplugin-settings_bool
zmplugin-settings_text
zmplugin-settings_smtp_settings
...

Browser metrics Passed 4 tests

An overview of browser requirements for ZMPlugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5114.04 ▼0.321.79 ▲0.0743.77 ▼0.88
Dashboard /wp-admin2,221 ▲475.65 ▲0.0289.11 ▼6.2841.35 ▼2.06
Posts /wp-admin/edit.php2,123 ▲232.00 ▲0.0439.56 ▼5.3535.56 ▲0.09
Add New Post /wp-admin/post-new.php2,198 ▲67222.17 ▼1.33707.30 ▲22.4149.86 ▼12.36
Media Library /wp-admin/upload.php1,423 ▲234.17 ▼0.0497.60 ▼14.3541.17 ▼3.84
Dashboard /wp-admin/admin.php?page=zmplugin1,0852.6756.6337.83
Settings /wp-admin/admin.php?page=zmplugin-settings1,6902.8965.8732.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 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 12 options in the database
    • db_upgraded
    • zmplugin-settings_bool
    • can_compress_scripts
    • widget_theysaidso_widget
    • zmplugin-settings_int
    • widget_recent-posts
    • zmplugin-settings_smtp_settings
    • zmplugin-settings_url
    • zmplugin-settings_sanitize
    • theysaidso_admin_options
    • ...

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/zmplugin/zmplugin.php
  • 168× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\BuildSingleControll' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/_class_background_img.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\com_section_nav' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/com_content_section_nav.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\_text' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/after.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\BuildSingleControll' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/_attrs_height.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\_class' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/menu_container_class.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\BuildSingleControll' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/_toggle_true_false.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\BuildSingleControll' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/offcanvas_module.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\com_section_html' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/com_main_section_html.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\BuildSingleControll' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/_class_width.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZMP\\Plugin\\Config\\ThemeCustomizer\\Controlls\\BuildSingleControll' not found in wp-content/plugins/zmplugin/config/themecustomizer/controlls/image_class.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #1, #2 in zmplugin/assets to your readme.txt
Please take inspiration from this readme.txt

zmplugin/zmplugin.php Passed 13 tests

The entry point to "ZMPlugin" version 1.0.27 is a PHP file that has certain tags in its header comment area
140 characters long description:
Essential tools for webmasters; cookie notice, analytics integration, private mode, SMTP mail and extension for ZuestMedia WordPress Themes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin19,125 lines of code in 321 files:
LanguageFilesBlank linesComment linesLines of code
PHP3045,5251,91610,901
PO File33,3034,2096,882
JavaScript8498270789
CSS66866553

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.04
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes305
▷ Abstract classes00.00%
▷ Concrete classes305100.00%
▷ Final classes00.00%
Methods703
▷ Static methods567.97%
▷ Public methods62689.05%
▷ Protected methods7610.81%
▷ Private methods10.14%
Functions143
▷ Named functions117.69%
▷ Anonymous functions13292.31%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
app/themecustomizer/img/alphacolor-transparency-grid.png2.58KB2.80KB0.00%