10% ad-box-widtget-for-az-invest-affiliate-program

Code Review | Ad box widtget for az-invest affiliateprogram

WordPress plugin Ad box widtget for az-invest affiliateprogram scored 10% from 54 tests.

About plugin

  • Plugin page: ad-box-widtget-fo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.9.2
  • First release: Oct 18, 2013
  • Latest release: Oct 18, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ArturZ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 780 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ad-box-widtget-for-az-invest-affiliate-program/az_invest_affiliate.php+105
    Function create_function() is deprecated

Server metrics [RAM: ▼2.53MB] [CPU: ▼356.49ms] Passed 4 tests

An overview of server-side resources used by Ad box widtget for az-invest affiliateprogram
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼1.683.84 ▼47.80
Dashboard /wp-admin1.86 ▼1.553.89 ▼32.70
Posts /wp-admin/edit.php1.86 ▼1.783.85 ▼34.49
Add New Post /wp-admin/post-new.php1.86 ▼5.113.67 ▼1,310.96
Media Library /wp-admin/upload.php1.86 ▼1.443.59 ▼22.33

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
widget_az_invest_affiliate

Browser metrics Passed 4 tests

A check of browser resources used by Ad box widtget for az-invest affiliateprogram
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.86 ▼0.165.95 ▼1.202.65 ▲0.06
Dashboard /wp-admin2,895 ▲376.11 ▼0.10116.68 ▼12.34151.40 ▼8.75
Posts /wp-admin/edit.php2,694 ▲13.22 ▼0.1461.15 ▼3.18139.16 ▲2.11
Add New Post /wp-admin/post-new.php1,690 ▲6220.67 ▲0.59469.03 ▲72.10158.65 ▲2.68
Media Library /wp-admin/upload.php1,698 ▼05.49 ▲0.05140.46 ▲1.64187.49 ▼7.66

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/ad-box-widtget-for-az-invest-affiliate-program/az_invest_affiliate.php+105
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_az_invest_affiliate

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)
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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ad-box-widtget-for-az-invest-affiliate-program/az_invest_affiliate.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("")
  • Screenshots: Add images for these screenshots: #1 (http://www.az-invest.eu/downloads/plugin.png), #2 (http://www.az-invest.eu/downloads/plugin2.png)
The official readme.txt might help

ad-box-widtget-for-az-invest-affiliate-program/az_invest_affiliate.php 92% from 13 tests

The primary PHP file in "Ad box widtget for az-invest affiliateprogram" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ad-box-widtget-for-az-invest-affiliate-program.php" instead of "az_invest_affiliate.php")

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
Good job! No executable or dangerous file extensions detected105 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2201888
JavaScript14014
CSS1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/vtrbox.png65.99KB18.55KB▼ 71.89%
images/vtcbox.png84.16KB19.27KB▼ 77.11%