78% floating-adsense-bar

Code Review | Floating Adsense Bar

WordPress plugin Floating Adsense Bar scored78%from 54 tests.

About plugin

  • Plugin page: floating-adsense-bar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 22, 2012
  • Latest release: Oct 14, 2012
  • Number of updates: 5
  • Update frequency: every 4.4 days
  • Top authors: santoshreddypadire (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /22,656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Floating Adsense Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.22 ▼1.60
Dashboard /wp-admin3.32 ▼0.0240.59 ▼16.93
Posts /wp-admin/edit.php3.37 ▲0.0244.02 ▼5.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.73 ▼13.73
Media Library /wp-admin/upload.php3.25 ▲0.0230.71 ▼2.16
Floating Adsense Bar /wp-admin/options-general.php?page=Floating_Ad3.1929.93

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Floating Adsense Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16614.11 ▼0.265.28 ▲3.5640.21 ▼0.54
Dashboard /wp-admin2,210 ▲255.90 ▲0.05110.47 ▲7.5241.98 ▲1.13
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0638.38 ▼1.7333.96 ▼1.84
Add New Post /wp-admin/post-new.php1,517 ▼1117.67 ▼5.55613.76 ▲2.7346.42 ▼17.09
Media Library /wp-admin/upload.php1,392 ▲14.19 ▲0.0198.06 ▼5.5441.06 ▼4.01
Floating Adsense Bar /wp-admin/options-general.php?page=Floating_Ad8722.0522.7327.34

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Floating_Ad
    • > Warning in wp-content/plugins/floating-adsense-bar/floating-adsense-bar.php+128
    Use of undefined constant FF_LeftRight - assumed 'FF_LeftRight' (this will throw an Error in a future version of PHP)

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 take a closer look at the following
  • 1× 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/floating-adsense-bar/floating-adsense-bar.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Plug-in options screen.), #2 (Example of Adsense Bar.), #3 (Another example of Adsense Bar.)
The official readme.txt is a good inspiration

floating-adsense-bar/floating-adsense-bar.php 92% from 13 tests

"Floating Adsense Bar" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 183 characters long)

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
No dangerous file extensions were detected146 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11819118
CSS10128

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
3 PNG files occupy 0.46MB with 0.27MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png382.68KB161.45KB▼ 57.81%
screenshot-1.PNG30.08KB11.61KB▼ 61.39%
screenshot-2.PNG58.03KB25.97KB▼ 55.25%