94% givewp-toolbar

Code Review | Give Toolbar

WordPress plugin Give Toolbar scored 94% from 54 tests.

About plugin

  • Plugin page: givewp-toolbar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 5.8.1
  • First release: May 22, 2015
  • Latest release: May 22, 2015
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: NikV (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 794 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by Give Toolbar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0142.70 ▼11.65
Dashboard /wp-admin3.07 ▲0.0151.85 ▼20.66
Posts /wp-admin/edit.php3.12 ▲0.0051.18 ▼6.53
Add New Post /wp-admin/post-new.php5.43 ▼0.01107.15 ▼548.82
Media Library /wp-admin/upload.php3.01 ▲0.0138.96 ▼3.17

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Give Toolbar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6816.21 ▲0.5114.99 ▼5.4549.99 ▼20.69
Dashboard /wp-admin2,970 ▲415.93 ▲0.03156.49 ▼57.73121.41 ▼28.27
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0075.97 ▲7.1496.18 ▲0.68
Add New Post /wp-admin/post-new.php1,615 ▼6821.38 ▲3.06325.23 ▼99.00113.81 ▼4.79
Media Library /wp-admin/upload.php1,807 ▼04.95 ▼0.08170.66 ▼4.30129.42 ▲4.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/givewp-toolbar/GiveWP-toolbar.php:104

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (The Current Toolbar) image missing
The official readme.txt is a good inspiration

givewp-toolbar/GiveWP-toolbar.php 92% from 13 tests

The primary PHP file in "Give Toolbar" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("givewp-toolbar.php" instead of "GiveWP-toolbar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin71 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1132269
Markdown1102

PHP code Passed 2 tests

An overview 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.36
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.91KB3.20KB▼ 76.97%