88% ads-benedict

Code Review | Ads Benedict

WordPress plugin Ads Benedict scored 88% 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: 5.9.2
  • 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 / 985 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼296.13ms] Passed 4 tests

An overview of server-side resources used by Ads Benedict
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1756.25 ▲8.27
Dashboard /wp-admin3.56 ▲0.1532.92 ▲1.83
Posts /wp-admin/edit.php3.78 ▲0.1437.31 ▲1.79
Add New Post /wp-admin/post-new.php7.03 ▲0.0693.52 ▼1,188.60
Media Library /wp-admin/upload.php3.44 ▲0.1526.96 ▲0.47
Add New /wp-admin/post-new.php?post_type=adsbenedict3.7343.73
Ads /wp-admin/edit.php?post_type=adsbenedict3.4826.76
Advertisers /wp-admin/edit-tags.php?taxonomy=advertisers&post_type=adsbenedict3.4424.05
Zones /wp-admin/edit-tags.php?taxonomy=zone&post_type=adsbenedict3.4426.41
Ad's Benedict Settings /wp-admin/edit.php?post_type=adsbenedict&page=absetting3.4124.29

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Ads Benedict: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,022 ▲27816.81 ▲1.1712.03 ▲5.702.91 ▲0.76
Dashboard /wp-admin2,971 ▲1106.21 ▲0.04108.83 ▼26.82162.20 ▲2.05
Posts /wp-admin/edit.php2,767 ▲733.27 ▲0.0372.66 ▲10.41166.02 ▲20.82
Add New Post /wp-admin/post-new.php1,722 ▲6218.16 ▲2.59406.51 ▼54.13177.98 ▲32.72
Media Library /wp-admin/upload.php1,779 ▲815.70 ▲0.16122.19 ▼19.14183.02 ▼2.02
Add New /wp-admin/post-new.php?post_type=adsbenedict2,5825.9398.92124.11
Ads /wp-admin/edit.php?post_type=adsbenedict1,4913.3160.37109.07
Advertisers /wp-admin/edit-tags.php?taxonomy=advertisers&post_type=adsbenedict1,6633.1456.38107.30
Zones /wp-admin/edit-tags.php?taxonomy=zone&post_type=adsbenedict1,6673.1458.00101.46
Ad's Benedict Settings /wp-admin/edit.php?post_type=adsbenedict&page=absetting1,0972.7656.84111.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ads-benedict/adsbenedict.php
    • > /wp-content/plugins/ads-benedict/include/admin.php
    • > /wp-content/plugins/ads-benedict/include/yourls.php
    • > /wp-content/plugins/ads-benedict/post-types/adsbenedict.php
    • > /wp-content/plugins/ads-benedict/taxonomies/zone.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 just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: ad network, banner ads, double click for publishers, easy ads

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

The main file in "Ads Benedict" v. 0.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • 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 is invalid: folder "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be 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 | Executable files are considered dangerous and should not be included with 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

An overview 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.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected