10% zool-viral-ads

Code Review | Zool Viral Ads

WordPress plugin Zool Viral Ads scored10%from 54 tests.

About plugin

  • Plugin page: zool-viral-ads
  • Plugin version: 1.1.1.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.6-4.6
  • WordPress version: 6.3.1
  • First release: Oct 4, 2016
  • Latest release: Mar 19, 2017
  • Number of updates: 32
  • Update frequency: every 5.5 days
  • Top authors: zoolley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,176 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/zool-viral-ads/zoolviralads.php+194
    Methods with the same name as their class will not be constructors in a future version of PHP; zool_widget has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼55.76ms] Passed 4 tests

Server-side resources used by Zool Viral Ads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.99 ▼39.39
Dashboard /wp-admin2.11 ▼1.195.55 ▼55.72
Posts /wp-admin/edit.php2.12 ▼1.245.40 ▼42.46
Add New Post /wp-admin/post-new.php2.11 ▼3.779.09 ▼85.45
Media Library /wp-admin/upload.php2.12 ▼1.116.36 ▼26.15
Zool Viral Ads /wp-admin/options-general.php?page=zool-viral-ads2.126.37

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_zool_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Zool Viral Ads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.34 ▼0.262.10 ▲0.2942.70 ▼0.38
Dashboard /wp-admin2,199 ▲225.68 ▲0.0192.47 ▼8.0040.04 ▼4.92
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0537.03 ▲2.3936.43 ▲2.09
Add New Post /wp-admin/post-new.php1,531 ▲323.26 ▲0.32661.98 ▼33.4658.37 ▲3.60
Media Library /wp-admin/upload.php1,407 ▲104.21 ▼0.0295.83 ▼6.6642.07 ▼0.48
Zool Viral Ads /wp-admin/options-general.php?page=zool-viral-ads8472.0324.5526.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/zool-viral-ads/zoolviralads.php+194
    Methods with the same name as their class will not be constructors in a future version of PHP; zool_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_zool_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=zool-viral-ads
    • > Deprecated in wp-content/plugins/zool-viral-ads/zoolviralads.php+194
    Methods with the same name as their class will not be constructors in a future version of PHP; zool_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=zool-viral-ads
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in zool_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=zool-viral-ads
    • > Notice in wp-content/plugins/zool-viral-ads/zoolviralads.php+141
    Trying to access array offset on value of type bool

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/zool-viral-ads/zoolviralads.php:12

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 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 24 tag instead of maximum 10
The official readme.txt is a good inspiration

zool-viral-ads/zoolviralads.php 85% from 13 tests

The principal PHP file in "Zool Viral Ads" v. 1.1.1.13 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zool-viral-ads.php" instead of "zoolviralads.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
There were no executable files found in this plugin175 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16735173
CSS21172

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions6
▷ Named functions6100.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