78% ads-benedict

Code Review | Ads Benedict

WordPress plugin Ads Benedict scored78%from 54 tests.

About plugin

  • Plugin page: ads-benedict
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Mar 7, 2016
  • Latest release: Jun 3, 2016
  • Number of updates: 16
  • Update frequency: every 5.5 days
  • Top authors: binarygary (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.62ms] Passed 4 tests

Server-side resources used by Ads Benedict
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.98 ▼12.02
Dashboard /wp-admin3.36 ▲0.0552.92 ▼5.43
Posts /wp-admin/edit.php3.41 ▲0.0548.15 ▼3.10
Add New Post /wp-admin/post-new.php5.94 ▲0.0691.02 ▼21.92
Media Library /wp-admin/upload.php3.28 ▲0.0539.73 ▲2.87
Advertisers /wp-admin/edit-tags.php?taxonomy=advertisers&post_type=adsbenedict3.3739.99
Ads /wp-admin/edit.php?post_type=adsbenedict3.3337.90
Zones /wp-admin/edit-tags.php?taxonomy=zone&post_type=adsbenedict3.2835.03
Add New /wp-admin/post-new.php?post_type=adsbenedict3.4351.53
Ad's Benedict Settings /wp-admin/edit.php?post_type=adsbenedict&page=absetting3.2542.33

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ads Benedict
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20714.05 ▼0.3112.43 ▲10.3042.84 ▼1.10
Dashboard /wp-admin2,260 ▲805.66 ▼0.0189.96 ▼2.6238.84 ▲0.60
Posts /wp-admin/edit.php2,165 ▲652.06 ▲0.0434.69 ▼3.4734.42 ▼2.59
Add New Post /wp-admin/post-new.php1,581 ▲5522.79 ▼0.28667.93 ▲25.5835.93 ▼20.84
Media Library /wp-admin/upload.php1,462 ▲624.35 ▲0.1897.99 ▼14.4244.14 ▼5.19
Advertisers /wp-admin/edit-tags.php?taxonomy=advertisers&post_type=adsbenedict1,3111.8828.7133.72
Ads /wp-admin/edit.php?post_type=adsbenedict1,1582.0238.6230.11
Zones /wp-admin/edit-tags.php?taxonomy=zone&post_type=adsbenedict1,3111.8526.6530.43
Add New /wp-admin/post-new.php?post_type=adsbenedict1,9594.0169.7629.00
Ad's Benedict Settings /wp-admin/edit.php?post_type=adsbenedict&page=absetting8821.8625.0826.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/ads-benedict/adsbenedict.php
    • > /wp-content/plugins/ads-benedict/taxonomies/zone.php
    • > /wp-content/plugins/ads-benedict/include/yourls.php
    • > /wp-content/plugins/ads-benedict/include/admin.php
    • > /wp-content/plugins/ads-benedict/post-types/adsbenedict.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ads-benedict/taxonomies/advertisers.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: ad network, banner ads, easy ads, double click for publishers

ads-benedict/adsbenedict.php 77% from 13 tests

The main PHP script in "Ads Benedict" version 0.3.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("ads-benedict.php" instead of "adsbenedict.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin530 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP68423513
JavaScript10017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin