83% button-it-up

Code Review | Button It Up

WordPress plugin Button It Up scored83%from 54 tests.

About plugin

  • Plugin page: button-it-up
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Mar 27, 2012
  • Latest release: Jun 21, 2012
  • Number of updates: 10
  • Update frequency: every 8.7 days
  • Top authors: parisvega (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,265 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.68ms] Passed 4 tests

A check of server-side resources used by Button It Up
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.89 ▼5.01
Dashboard /wp-admin3.31 ▲0.0058.51 ▲0.51
Posts /wp-admin/edit.php3.36 ▲0.0056.90 ▲2.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.19 ▼10.00
Media Library /wp-admin/upload.php3.23 ▲0.0040.49 ▼0.22

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Button It Up
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.40 ▲0.051.92 ▲0.0144.11 ▲0.74
Dashboard /wp-admin2,193 ▲165.57 ▼0.2891.78 ▲3.1741.44 ▼5.10
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0540.71 ▲4.7835.87 ▼1.26
Add New Post /wp-admin/post-new.php1,527 ▲123.19 ▼0.33650.61 ▼89.7456.66 ▼2.97
Media Library /wp-admin/upload.php1,395 ▼54.21 ▼0.00100.61 ▼11.8446.07 ▼3.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/button-it-up/index.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (This is an example of the normal WordPress editor screen before activating the Button It Up plugin.), #2 (This is the WordPress editor screen after activating the Button It Up plugin.)
  • Plugin Name: You should set the name of your plugin on the first line ( === button-it-up === )
Please take inspiration from this readme.txt

button-it-up/index.php 85% from 13 tests

The principal PHP file in "Button It Up" v. 1... is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("button-it-up.php" instead of "index.php")
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin69 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS15763
PHP14206

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png77.50KB29.77KB▼ 61.59%
screenshot-2.png76.32KB29.00KB▼ 62.01%