10% go-ads-widget

Code Review | Go Ads widget

WordPress plugin Go Ads widget scored 10% from 54 tests.

About plugin

  • Plugin page: go-ads-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.2
  • WordPress version: 6.3.1
  • First release: Aug 15, 2014
  • Latest release: Aug 16, 2014
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: goresponsive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,850 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/go-ads-widget/GO-ads.php+974
    Methods with the same name as their class will not be constructors in a future version of PHP; ads300_250 has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼55.46ms] Passed 4 tests

Analyzing server-side resources used by Go Ads widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.73 ▼38.95
Dashboard /wp-admin2.07 ▼1.235.51 ▼47.62
Posts /wp-admin/edit.php2.07 ▼1.286.68 ▼41.78
Add New Post /wp-admin/post-new.php2.07 ▼3.815.45 ▼93.49
Media Library /wp-admin/upload.php2.07 ▼1.155.48 ▼29.39

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 16 new options
New WordPress options
widget_ads120-60
widget_ads250-250
widget_ads300-250
widget_ads120-240
widget_ads120-600
widget_ads120-90
widget_ads300-600
db_upgraded
theysaidso_admin_options
widget_ads160-600
...

Browser metrics Passed 4 tests

An overview of browser requirements for Go Ads widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.55 ▼1.004.87 ▲3.1243.87 ▲6.65
Dashboard /wp-admin2,208 ▲204.86 ▼0.02110.11 ▲2.0040.86 ▼4.42
Posts /wp-admin/edit.php2,094 ▲22.02 ▼0.0440.43 ▼2.5234.11 ▼2.19
Add New Post /wp-admin/post-new.php1,516 ▲217.71 ▼0.01697.98 ▲21.0361.62 ▼0.16
Media Library /wp-admin/upload.php1,387 ▲24.22 ▼0.0598.96 ▼4.9041.20 ▼3.74

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ads_styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 16 options
    • theysaidso_admin_options
    • widget_ads250-250
    • widget_ads120-600
    • db_upgraded
    • widget_recent-comments
    • widget_ads120-60
    • can_compress_scripts
    • widget_ads120-240
    • widget_ads300-100
    • widget_theysaidso_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 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/go-ads-widget/GO-ads.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.png - Widget Options), #2 (screenshot-2.png - Front end)
The official readme.txt is a good inspiration

go-ads-widget/GO-ads.php 92% from 13 tests

"Go Ads widget" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("go-ads-widget.php" instead of "GO-ads.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
Everything looks great! No dangerous files found in this plugin1,057 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP113429916
CSS1120141

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity9.80
▷ Minimum class complexity9.00
▷ Maximum class complexity10.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
2 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.46KB12.95KB▼ 44.81%
screenshot-2.png73.91KB20.41KB▼ 72.38%