62% badad

Code Review | badAd

WordPress plugin badAd scored62%from 54 tests.

About plugin

  • Plugin page: badad
  • Plugin version: 1.2
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-6.3.0
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Aug 20, 2023
  • Number of updates: 24
  • Update frequency: every 51.5 days
  • Top authors: jesselsteele (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /603 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.71ms] Passed 4 tests

Analyzing server-side resources used by badAd
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.00 ▲1.66
Dashboard /wp-admin3.36 ▲0.0550.45 ▼5.61
Posts /wp-admin/edit.php3.47 ▲0.1147.25 ▼2.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.07 ▼4.77
Media Library /wp-admin/upload.php3.28 ▲0.0536.42 ▼2.16
badAd /wp-admin/options-general.php?page=badad-settings3.3033.39

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 14 new options
New WordPress options
can_compress_scripts
badad_siteslug
badad_call_key
badad_live_sec
badad_live_pub
badad_testlive
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for badAd
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼1.012.83 ▲0.9647.41 ▲0.57
Dashboard /wp-admin2,210 ▲225.85 ▲0.95117.99 ▲9.3947.63 ▲5.35
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.1437.43 ▼7.3332.70 ▼3.16
Add New Post /wp-admin/post-new.php1,545 ▲1223.06 ▼0.18648.41 ▲19.2853.08 ▲4.40
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.02100.70 ▼10.6441.23 ▼4.71
badAd /wp-admin/options-general.php?page=badad-settings1,7235.43153.8160.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'badAdDeactivate' not found
  • Zombie WordPress options detected upon uninstall: 14 options
    • badad_live_pub
    • badad_test_sec
    • badad_live_sec
    • widget_recent-comments
    • badad_test_pub
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • badad_access
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/badad/badad.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/badad/files.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_blog_id() in wp-content/plugins/badad/checks.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/badad/levels.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WP_Filesystem() in wp-content/plugins/badad/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_blog_id() in wp-content/plugins/badad/functions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WP_Filesystem() in wp-content/plugins/badad/callback.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=badad-settings
    • > Network (severe)
    https://seed151.bitchute.com/tLeAONvWjCw8/gW3C4CtlzrWw.mp4 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: embed, ads, monetize, advertise, ad shortcode

badad/badad.php 92% from 13 tests

"badAd" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 305 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected746 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10130197725
Markdown18019
CSS1102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin