84% wpsite-simple-ad-spot

Code Review | Simple Ad Spot by 99 Robots

WordPress plugin Simple Ad Spot by 99 Robots scored84%from 54 tests.

About plugin

  • Plugin page: wpsite-simple-ad-...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2014
  • Latest release: Aug 6, 2022
  • Number of updates: 26
  • Update frequency: every 112.7 days
  • Top authors: 99robots (61.54%)wpsitenet (42.31%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,748 total downloads

Benchmarks

Plugin footprint 83% 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.02MB] [CPU: ▼4.88ms] Passed 4 tests

This is a short check of server-side resources used by Simple Ad Spot by 99 Robots
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0346.87 ▲4.32
Dashboard /wp-admin3.34 ▼0.0148.18 ▼13.08
Posts /wp-admin/edit.php3.39 ▲0.0344.03 ▼3.86
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.84 ▼6.90
Media Library /wp-admin/upload.php3.26 ▲0.0337.37 ▲4.40

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_wpsite-simple-ad-spot
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Ad Spot by 99 Robots
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.20 ▼0.161.69 ▼0.1344.21 ▲0.58
Dashboard /wp-admin2,198 ▲305.61 ▲0.0589.36 ▲3.0639.05 ▼3.01
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0234.56 ▼6.6234.02 ▼4.67
Add New Post /wp-admin/post-new.php1,526 ▼023.20 ▼0.36652.62 ▼7.4251.37 ▲4.30
Media Library /wp-admin/upload.php1,397 ▼34.18 ▲0.0597.14 ▲0.9140.17 ▼1.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_wpsite-simple-ad-spot
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpsite-simple-ad-spot/wpsite-simple-ad-spot.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

wpsite-simple-ad-spot/wpsite-simple-ad-spot.php Passed 13 tests

The main PHP file in "Simple Ad Spot by 99 Robots" ver. 1.1.7 adds more information about the plugin and also serves as the entry point for this plugin
105 characters long description:
The DraftPress Simple Ad Spot plugin is the easiest way to place an advertisement in your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected91 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1275691
Markdown1100

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods233.33%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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 files were detected