84% pzz-api-client

Code Review | PZZ API Client

WordPress plugin PZZ API Client scored84%from 54 tests.

About plugin

  • Plugin page: pzz-api-client
  • Plugin version: 1.2.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.6
  • WordPress version: 6.3.1
  • First release: Jun 18, 2020
  • Latest release: Jun 19, 2021
  • Number of updates: 32
  • Update frequency: every 11.5 days
  • Top authors: mjavadhpour (93.75%)thisismzm (9.38%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,692 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.55ms] Passed 4 tests

Analyzing server-side resources used by PZZ API Client
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.54 ▼1.26
Dashboard /wp-admin3.35 ▲0.0545.34 ▼2.30
Posts /wp-admin/edit.php3.46 ▲0.1147.35 ▲1.19
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.04 ▼27.81
Media Library /wp-admin/upload.php3.27 ▲0.0534.93 ▲1.54

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for PZZ API Client
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.48 ▲0.101.81 ▲0.1439.42 ▼6.57
Dashboard /wp-admin2,206 ▲184.86 ▼1.05106.47 ▲3.8838.17 ▼5.86
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0438.74 ▼2.1333.81 ▼2.26
Add New Post /wp-admin/post-new.php1,533 ▲1923.20 ▲5.75638.34 ▼19.7654.62 ▲5.35
Media Library /wp-admin/upload.php1,391 ▲94.17 ▼0.0693.59 ▼4.2441.97 ▼0.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pzz-api-client/pzz-api-client.php:32
    • > PHP Warning
      require_once(wp-content/plugins/pzz-api-client/JWT.php): failed to open stream: No such file or directory in wp-content/plugins/pzz-api-client/modifications.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/pzz-api-client/JWT.php' (include_path='.:/usr/share/php') in wp-content/plugins/pzz-api-client/modifications.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'PZZ_API_Controller' not found in wp-content/plugins/pzz-api-client/includes/lib/class-pzz-json-media.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'PZZ_JSON_ResponseInterface' not found in wp-content/plugins/pzz-api-client/includes/lib/class-pzz-json-response.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PZZ_JSON_Meta' not found in wp-content/plugins/pzz-api-client/includes/lib/class-pzz-json-meta-posts.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: api, shopping, woocommerce, mobile, restful api

pzz-api-client/pzz-api-client.php 85% from 13 tests

The primary PHP file in "PZZ API Client" version 1.2.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Description: Please keep the plugin description shorter than 140 characters (currently 164 characters long)

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 plugin2,538 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP345761,6222,538

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes29
▷ Abstract classes13.45%
▷ Concrete classes2896.55%
▷ Final classes00.00%
Methods146
▷ Static methods2114.38%
▷ Public methods10773.29%
▷ Protected methods106.85%
▷ Private methods2919.86%
Functions40
▷ Named functions1025.00%
▷ Anonymous functions3075.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 are no PNG files in this plugin