74% quabads

Code Review | QuabAds Official Plugin

WordPress plugin QuabAds Official Plugin scored74%from 54 tests.

About plugin

  • Plugin page: quabads
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Jan 23, 2021
  • Latest release: Jul 13, 2022
  • Number of updates: 10
  • Update frequency: every 53.7 days
  • Top authors: quabads (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /442 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.47ms] Passed 4 tests

Server-side resources used by QuabAds Official Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.03 ▲2.47
Dashboard /wp-admin3.39 ▲0.0946.84 ▲1.78
Posts /wp-admin/edit.php3.50 ▲0.1551.00 ▼3.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.00 ▼6.98
Media Library /wp-admin/upload.php3.31 ▲0.0839.61 ▲8.07

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
widget_quabads
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for QuabAds Official Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.18 ▼1.501.59 ▲0.0039.73 ▼2.16
Dashboard /wp-admin2,226 ▲384.85 ▼0.08107.08 ▲4.0642.11 ▲5.89
Posts /wp-admin/edit.php2,106 ▲142.04 ▼0.0039.25 ▲3.9134.42 ▲1.73
Add New Post /wp-admin/post-new.php1,656 ▲13724.44 ▲1.31554.26 ▼81.7460.56 ▲10.36
Media Library /wp-admin/upload.php1,399 ▲84.18 ▼0.1295.27 ▼1.6140.56 ▼3.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/quabads/uninstall.php+33
    unlink(/bin): Permission denied
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quabads/public/quabads-sidebar-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quabads/public/quabads-header-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/quabads/admin/partials/quabads-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 your attention:
  • Screenshots: Screenshot #1 (Easily integrate & manage your site monetization solutions from WordPress dashboard.) image missing
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
The official readme.txt is a good inspiration

quabads/quabads.php Passed 13 tests

"QuabAds Official Plugin" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
93 characters long description:
This plugin is designed for those who want to monetize their websites through advertisements.

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
Success! There were no dangerous files found in this plugin1,512 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP171754291,096
JavaScript2120234
CSS4143182

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.73
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity1.99
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods75
▷ Static methods22.67%
▷ Public methods5877.33%
▷ Protected methods11.33%
▷ Private methods1621.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png3.57KB1.75KB▼ 50.89%
admin/js/icon.png3.57KB1.75KB▼ 50.89%
admin/img/ad.png3.57KB1.75KB▼ 50.89%