80% wpads

Code Review | WPAds

WordPress plugin WPAds scored80%from 54 tests.

About plugin

  • Plugin page: wpads
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2017
  • Latest release: Feb 22, 2019
  • Number of updates: 37
  • Update frequency: every 19.2 days
  • Top authors: webzunft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /5,769 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.76ms] Passed 4 tests

Analyzing server-side resources used by WPAds
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.46 ▼7.88
Dashboard /wp-admin3.35 ▼0.0053.84 ▼10.87
Posts /wp-admin/edit.php3.40 ▲0.0448.44 ▼0.99
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.07 ▲7.38
Media Library /wp-admin/upload.php3.27 ▲0.0434.08 ▼3.31
WPAds /wp-admin/options-general.php?page=wpads_menu_page3.3336.76

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: 1 new table, 7 new options
New tables
wp_ads_banners
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
wpads_version
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPAds
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.67 ▼0.921.54 ▼0.3637.34 ▼10.22
Dashboard /wp-admin2,210 ▲224.88 ▼0.15108.10 ▼6.9839.73 ▼3.75
Posts /wp-admin/edit.php2,090 ▲41.99 ▼0.0238.83 ▲2.9134.84 ▲1.57
Add New Post /wp-admin/post-new.php1,545 ▲718.00 ▼5.09595.43 ▼116.8558.31 ▲6.24
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0196.85 ▼13.0342.25 ▲0.02
WPAds /wp-admin/options-general.php?page=wpads_menu_page8322.0325.3130.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ads_banners
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • wpads_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: adverts, rotation, ad manager, banner, ads

wpads/wpads.php Passed 13 tests

The main PHP script in "WPAds" version 0.3.1 is automatically included on every request by WordPress
27 characters long description:
Ad management for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin542 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36385542

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods738.89%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
thomas.png18.28KB6.52KB▼ 64.31%