84% better-ads

Code Review | Better Ads

WordPress plugin Better Ads scored84%from 54 tests.

About plugin

  • Plugin page: better-ads
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Apr 15, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: mehedee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,284 total downloads

Benchmarks

Plugin footprint 82% 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.01MB] [CPU: ▼3.04ms] Passed 4 tests

Analyzing server-side resources used by Better Ads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.22 ▲0.73
Dashboard /wp-admin3.32 ▲0.0152.46 ▼0.42
Posts /wp-admin/edit.php3.37 ▲0.0150.89 ▲2.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.85 ▼8.93
Media Library /wp-admin/upload.php3.24 ▲0.0138.20 ▼3.53

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/better-ads/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Better Ads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲7013.35 ▼1.081.65 ▼0.4940.47 ▼1.45
Dashboard /wp-admin2,234 ▲315.79 ▼0.1296.95 ▼10.7643.59 ▲2.23
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0040.01 ▲4.0636.87 ▲2.68
Add New Post /wp-admin/post-new.php1,567 ▲3618.04 ▼5.33623.61 ▼88.5454.99 ▼4.01
Media Library /wp-admin/upload.php1,410 ▲134.20 ▼0.0498.18 ▼17.2744.39 ▼4.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-ads/better-ads.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: ad, better-ads, ads, google, google adsense...

better-ads/better-ads.php Passed 13 tests

This is the main PHP file of "Better Ads" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
50 characters long description:
Manages Your Ad in your posts in the simpliest way

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
Everything looks great! No dangerous files found in this plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171238

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
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
PNG images were not found in this plugin