78% insert-adsense-plus-ultra

Code Review | Insert Adsense Plus Ultra

WordPress plugin Insert Adsense Plus Ultra scored78%from 54 tests.

About plugin

  • Plugin page: insert-adsense-pl...
  • Plugin version: 1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2019
  • Latest release: Dec 15, 2019
  • Number of updates: 44
  • Update frequency: every 7.3 days
  • Top authors: dottorzed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,001 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.98ms] Passed 4 tests

A check of server-side resources used by Insert Adsense Plus Ultra
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.71 ▲1.14
Dashboard /wp-admin3.32 ▲0.0249.81 ▼3.01
Posts /wp-admin/edit.php3.43 ▲0.0850.50 ▼2.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.28 ▼19.23
Media Library /wp-admin/upload.php3.24 ▲0.0137.97 ▲2.43
Adsense Plus Ultra /wp-admin/options-general.php?page=insert-adsense-plus-ultra3.1933.77

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Insert Adsense Plus Ultra
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.162.04 ▲0.3844.03 ▲3.43
Dashboard /wp-admin2,199 ▲225.65 ▲0.0588.06 ▼2.7438.25 ▼5.81
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0440.59 ▲5.4834.43 ▼3.08
Add New Post /wp-admin/post-new.php1,531 ▲522.96 ▲0.04659.47 ▼25.3053.76 ▲3.77
Media Library /wp-admin/upload.php1,407 ▲74.18 ▲0.01109.30 ▼2.7947.24 ▼1.08
Adsense Plus Ultra /wp-admin/options-general.php?page=insert-adsense-plus-ultra1,0012.1329.6331.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=insert-adsense-plus-ultra
    • > Notice in wp-content/plugins/insert-adsense-plus-ultra/src/APU/SettingsPage.php+187
    Undefined index: APU_short1
    • > GET request to /wp-admin/options-general.php?page=insert-adsense-plus-ultra
    • > Notice in wp-content/plugins/insert-adsense-plus-ultra/src/APU/SettingsPage.php+193
    Undefined index: APU_short2
    • > GET request to /wp-admin/options-general.php?page=insert-adsense-plus-ultra
    • > Notice in wp-content/plugins/insert-adsense-plus-ultra/src/APU/SettingsPage.php+199
    Undefined index: APU_short3

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'APU_WpSubPage' not found in wp-content/plugins/insert-adsense-plus-ultra/src/APU/SettingsPage.php:2

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Ads Tab screenshot-1.(png|jpg|jpeg|gif).), #2 (Settings Tab screenshot-2.(png|jpg|jpeg|gif).)
The official readme.txt might help

insert-adsense-plus-ultra/insert-adsense-plus-ultra.php Passed 13 tests

This is the main PHP file of "Insert Adsense Plus Ultra" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
139 characters long description:
Fast and easy WordPress plugin to insert Google Adsense to all your pages and posts with the possibility of excluding other users from use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin606 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP412831417
PO File16166189

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.00
▷ Minimum class complexity7.00
▷ Maximum class complexity33.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin