68% wpzon

Code Review | WpZon - Amazon Affiliate Plugin

WordPress plugin WpZon - Amazon Affiliate Plugin scored68%from 54 tests.

About plugin

  • Plugin page: wpzon
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Sep 20, 2012
  • Latest release: May 25, 2014
  • Number of updates: 43
  • Update frequency: every 14.3 days
  • Top authors: Lora77 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /25,386 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.87MB] [CPU: ▼36.15ms] Passed 4 tests

A check of server-side resources used by WpZon - Amazon Affiliate Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.21 ▼3.32
Dashboard /wp-admin3.08 ▼0.2725.70 ▼39.25
Posts /wp-admin/edit.php3.08 ▼0.2826.02 ▼23.73
Add New Post /wp-admin/post-new.php3.08 ▼2.8122.83 ▼70.46
Media Library /wp-admin/upload.php3.08 ▼0.1525.21 ▼11.14
wpzon /wp-admin/options-general.php?page=wpzon3.0823.49

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WpZon - Amazon Affiliate Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.58 ▲0.181.77 ▲0.1244.29 ▲4.54
Dashboard /wp-admin2,202 ▲255.59 ▲0.0789.66 ▼3.9840.42 ▼1.61
Posts /wp-admin/edit.php2,104 ▲72.00 ▼0.1036.89 ▼2.3231.82 ▼5.83
Add New Post /wp-admin/post-new.php1,537 ▲1118.33 ▼4.74633.62 ▼139.0963.21 ▲5.54
Media Library /wp-admin/upload.php1,404 ▲14.19 ▼0.0196.26 ▼6.3142.71 ▼5.96
wpzon /wp-admin/options-general.php?page=wpzon1,1272.0524.1949.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpzon
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=wpzon
    • > Notice in wp-content/plugins/wpzon/wpzon.php+327
    Undefined index: az_updated

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wpzon/wpzon.php:442

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Screenshots: These screenshots do not have images: #1 (Products in two columns), #2 (Products in one column), #3 (Admin Panel)
The official readme.txt is a good inspiration

wpzon/wpzon.php Passed 13 tests

The entry point to "WpZon - Amazon Affiliate Plugin" version 1.3 is a PHP file that has certain tags in its header comment area
41 characters long description:
Add products from the Amazon Marketplace.

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 plugin355 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17711355

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin