73% info-toggle

Code Review | Top Bar Toggle

WordPress plugin Top Bar Toggle scored73%from 54 tests.

About plugin

  • Plugin page: info-toggle
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2018
  • Latest release: Mar 6, 2018
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: wpmaster24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /611 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.93MB] [CPU: ▼34.02ms] Passed 4 tests

Analyzing server-side resources used by Top Bar Toggle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.29 ▼3.84
Dashboard /wp-admin3.02 ▼0.2923.72 ▼30.83
Posts /wp-admin/edit.php3.02 ▼0.3426.98 ▼19.40
Add New Post /wp-admin/post-new.php3.02 ▼2.8724.80 ▼71.85
Media Library /wp-admin/upload.php3.02 ▼0.2122.64 ▼13.99

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Top Bar Toggle
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.28 ▼0.072.95 ▲1.0038.89 ▼10.06
Dashboard /wp-admin2,214 ▲345.63 ▼0.0484.05 ▼11.6839.85 ▼4.42
Posts /wp-admin/edit.php2,116 ▲161.96 ▲0.0033.18 ▼8.0433.04 ▼1.60
Add New Post /wp-admin/post-new.php1,539 ▲1123.51 ▲0.39683.12 ▼13.7363.01 ▲0.55
Media Library /wp-admin/upload.php1,407 ▲104.25 ▲0.0895.59 ▼15.5143.59 ▼6.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Warning in wp-content/plugins/info-toggle/toggle.php+28
    Use of undefined constant info_toggle_settings - assumed 'info_toggle_settings' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/info-toggle/toggle.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
  • Stable tag: Not defined
The official readme.txt might help

info-toggle/toggle.php 92% from 13 tests

The main PHP script in "Top Bar Toggle" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("info-toggle.php" instead of "toggle.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected630 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript18053440
PHP188147
CSS20043

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.58MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png132.32KB93.44KB▼ 29.38%
desktop.png16.01KB8.77KB▼ 45.25%
screenshot-3.png44.78KB13.92KB▼ 68.91%
assets/banner-772x250.png132.32KB93.44KB▼ 29.38%
assets/desktop.png16.01KB8.77KB▼ 45.25%