68% wp-revive-adserver

Code Review | WP-Revive Adserver

WordPress plugin WP-Revive Adserver scored68%from 54 tests.

About plugin

  • Plugin page: wp-revive-adserver
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 26, 2017
  • Latest release: Jun 1, 2022
  • Number of updates: 18
  • Update frequency: every 108.4 days
  • Top authors: zoan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,718 total downloads

Benchmarks

Plugin footprint 65% 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.11MB] [CPU: ▼2.31ms] Passed 4 tests

A check of server-side resources used by WP-Revive Adserver
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.45 ▲5.30
Dashboard /wp-admin3.41 ▲0.1152.56 ▼0.37
Posts /wp-admin/edit.php3.52 ▲0.1750.99 ▼1.30
Add New Post /wp-admin/post-new.php5.99 ▲0.1192.27 ▼11.35
Media Library /wp-admin/upload.php3.33 ▲0.1140.01 ▲3.77

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 29 new files
Database: 1 new table, 8 new options
New tables
wp_wprevive_vast_file
New WordPress options
can_compress_scripts
db_upgraded
wp-revive_version
widget_theysaidso_widget
wprevive_activation_redirect
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP-Revive Adserver
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.52 ▼0.861.87 ▼0.2844.61 ▲0.22
Dashboard /wp-admin2,236 ▲484.84 ▼0.07113.93 ▲13.4343.92 ▼0.25
Posts /wp-admin/edit.php2,116 ▲241.99 ▲0.0236.65 ▼6.7635.31 ▼0.33
Add New Post /wp-admin/post-new.php1,550 ▲1723.05 ▼0.39628.28 ▼53.1548.36 ▼15.94
Media Library /wp-admin/upload.php1,415 ▲274.16 ▲0.04101.85 ▼1.6641.83 ▼5.98
VAST 2 Campaigns /wp-admin/wp-revive.php?page=wprevive_vast_campaigns260.440.1214.39
WP-Revive /wp-admin/wp-revive.php260.440.095.11
VAST 2 Convert /wp-admin/wp-revive.php?page=wprevive_vast_convert260.440.079.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_wprevive_vast_file
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • wp-revive_version
    • wprevive_activation_redirect
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-revive-adserver/inc/panels/wprevive-general-panel.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/wp-revive.php?page=wprevive_vast_campaigns
    • > Network (severe)
    wp-admin/wp-revive.php?page=wprevive_vast_campaigns - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/wp-revive.php
    • > Network (severe)
    wp-admin/wp-revive.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/wp-revive.php?page=wprevive_vast_convert
    • > Network (severe)
    wp-admin/wp-revive.php?page=wprevive_vast_convert - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-revive-adserver === )
The official readme.txt is a good inspiration

wp-revive-adserver/wp-revive.php 85% from 13 tests

The main file in "WP-Revive Adserver" v. 2.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-revive-adserver.php" instead of "wp-revive.php")
  • Description: The description should be shorter than 140 characters (currently 177 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
There were no executable files found in this plugin1,093 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP212212101,086
JSON1007

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.14
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods46
▷ Static methods48.70%
▷ Public methods4495.65%
▷ Protected methods12.17%
▷ Private methods12.17%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants5
▷ Global constants5100.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
4 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot.png80.27KB25.86KB▼ 67.78%
inc/assets/WP_REVIVE_LGO.png8.34KB3.85KB▼ 53.85%
assets/banner-772x250.png31.56KB13.24KB▼ 58.05%
assets/icon-128x128.png9.72KB4.52KB▼ 53.52%