84% rollerads

Code Review | RollerAds - Web Push Notifications

WordPress plugin RollerAds - Web Push Notifications scored84%from 54 tests.

About plugin

  • Plugin page: rollerads
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2023
  • Latest release: Apr 24, 2023
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: rolleradsteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /245 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.61MB] [CPU: ▼14.27ms] Passed 4 tests

An overview of server-side resources used by RollerAds - Web Push Notifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.66 ▲3.29
Dashboard /wp-admin3.37 ▲0.0749.49 ▲1.26
Posts /wp-admin/edit.php3.48 ▲0.1351.68 ▼0.08
Add New Post /wp-admin/post-new.php3.25 ▼2.6437.10 ▼61.56
Media Library /wp-admin/upload.php3.29 ▲0.0642.98 ▲8.46

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by RollerAds - Web Push Notifications
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲7113.24 ▼1.362.28 ▼0.1046.30 ▲3.04
Dashboard /wp-admin2,211 ▲205.87 ▲0.96103.29 ▼7.9271.03 ▲26.13
Posts /wp-admin/edit.php2,109 ▲172.01 ▼0.0336.61 ▼1.6035.76 ▲0.24
Add New Post /wp-admin/post-new.php1,534 ▼822.99 ▼0.29760.38 ▲80.5955.26 ▼11.20
Media Library /wp-admin/upload.php1,408 ▲204.14 ▼0.06106.45 ▲5.7852.22 ▲6.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 take a closer look at the following
  • 3× 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/rollerads/includes/api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rollerads/includes/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rollerads/includes/service-worker.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (23 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

rollerads/rollerads.php Passed 13 tests

The main PHP file in "RollerAds - Web Push Notifications" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
77 characters long description:
RollerAds web-push notifications plugin for monetization and message sending.

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 plugin474 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP59396396
CSS110062
SVG20016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.42KB0.35KB▼ 15.22%