78% frontier-buttons

Code Review | Frontier Buttons

WordPress plugin Frontier Buttons scored78%from 54 tests.

About plugin

  • Plugin page: frontier-buttons
  • Plugin version: 2.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Apr 3, 2020
  • Number of updates: 97
  • Update frequency: every 31.9 days
  • Top authors: finnj (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /7,426 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.11MB] [CPU: ▼8.24ms] Passed 4 tests

Analyzing server-side resources used by Frontier Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1547.69 ▲1.80
Dashboard /wp-admin3.51 ▲0.1751.19 ▲0.51
Posts /wp-admin/edit.php3.61 ▲0.2250.14 ▼5.06
Add New Post /wp-admin/post-new.php5.01 ▼0.9164.59 ▼30.22
Media Library /wp-admin/upload.php3.42 ▲0.1541.17 ▲6.03
Frontier-Buttons /wp-admin/options-general.php?page=frontier-buttons/include/settings-menu.php3.5135.41

Server storage [IO: ▲0.67MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
frontier-buttons-general-settings

Browser metrics Passed 4 tests

Checking browser requirements for Frontier Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.18 ▼0.411.66 ▼0.1445.94 ▲3.10
Dashboard /wp-admin2,204 ▲275.63 ▲0.0088.42 ▼0.9337.51 ▼3.90
Posts /wp-admin/edit.php2,106 ▲32.01 ▲0.0532.73 ▼7.6335.91 ▼0.57
Add New Post /wp-admin/post-new.php1,531 ▲523.17 ▼0.40634.95 ▼59.1864.68 ▲13.00
Media Library /wp-admin/upload.php1,409 ▲124.19 ▲0.01101.85 ▼3.2047.01 ▼0.81
Frontier-Buttons /wp-admin/options-general.php?page=frontier-buttons/include/settings-menu.php2,6437.80149.2961.55

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=frontier-buttons/include/settings-menu.php
    • > Deprecated in wp-content/plugins/frontier-buttons/include/menu-item-main.php+98
    implode(): Passing glue string after array is deprecated. Swap the parameters

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/frontier-buttons/include/frontier-buttons-hooks.php:109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/frontier-buttons/frontier-buttons.php:24

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 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 your attention:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

frontier-buttons/frontier-buttons.php 92% from 13 tests

The principal PHP file in "Frontier Buttons" v. 2.5.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

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
There were no executable files found in this plugin2,090 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP106535291,443
CSS410235476
PO File1102158137
JavaScript250134

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin