83% wzm-json

Code Review | WZM Json

WordPress plugin WZM Json scored83%from 54 tests.

About plugin

  • Plugin page: wzm-json
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-5.7.2
  • WordPress version: 6.3.1
  • First release: May 29, 2021
  • Latest release: May 30, 2021
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: anno1800 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /319 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.77ms] Passed 4 tests

A check of server-side resources used by WZM Json
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1047.09 ▲3.11
Dashboard /wp-admin3.38 ▲0.0852.28 ▼7.36
Posts /wp-admin/edit.php3.49 ▲0.1456.30 ▲5.96
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.51 ▼12.77
Media Library /wp-admin/upload.php3.30 ▲0.0752.25 ▲18.23
生成 Json 数据 /wp-admin/options-general.php?page=wzm-json3.2739.87

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • Illegal file modification found: 1 file (0.45KB) outside of "wp-content/plugins/wzm-json/" and "wp-content/uploads/"
    • (new file) wzm.json
Filesystem: 7 new files
Database: no new tables, 10 new options
New WordPress options
category_children
can_compress_scripts
widget_recent-comments
wzm_json_update_time
widget_recent-posts
theysaidso_admin_options
wzm_posts_per_page
widget_theysaidso_widget
db_upgraded
wzm_products_per_page

Browser metrics Passed 4 tests

A check of browser resources used by WZM Json
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.25 ▲0.131.68 ▼0.3942.97 ▼3.45
Dashboard /wp-admin2,199 ▲195.55 ▼0.0791.48 ▲4.4143.06 ▲2.38
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0739.66 ▲3.0543.82 ▲8.37
Add New Post /wp-admin/post-new.php1,531 ▲523.40 ▲0.22666.60 ▼26.5451.54 ▲0.10
Media Library /wp-admin/upload.php1,404 ▲14.21 ▲0.05104.28 ▼1.2350.17 ▲4.27
生成 Json 数据 /wp-admin/options-general.php?page=wzm-json9752.1725.4460.70

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • category_children
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_next_scheduled() in wp-content/plugins/wzm-json/wzm-json-functions.php:304
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wzm-json/wzm-json-options.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wzm-json/wzm-json-regenerate.php:54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Contributors: The plugin contributors field is missing
  • Contributors: No valid plugin tags found
You can look at the official readme.txt

wzm-json/wzm-json.php 92% from 13 tests

Analyzing the main PHP file in "WZM Json" version 1.0.1
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin345 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP565353331
JavaScript10314

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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