10% big-red-button

Code Review | Big Red Button

WordPress plugin Big Red Button scored 10% from 54 tests.

About plugin

  • Plugin page: big-red-button
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 5.8.1
  • First release: Nov 27, 2012
  • Latest release: Nov 28, 2012
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: madsphi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,048 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/big-red-button/big-red-button.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; mp_brb_widget_big_red_button has a deprecated constructor

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

Server-side resources used by Big Red Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1242.76 ▲16.00
Dashboard /wp-admin3.06 ▲0.00114.11 ▲65.80
Posts /wp-admin/edit.php3.11 ▲0.0052.90 ▲7.82
Add New Post /wp-admin/post-new.php5.42 ▼0.02111.14 ▼536.39
Media Library /wp-admin/upload.php3.00 ▲0.0039.65 ▲5.44

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Big Red Button: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.99 ▲0.3511.51 ▲1.7144.70 ▼5.97
Dashboard /wp-admin2,970 ▲395.89 ▼0.08148.89 ▼6.90114.74 ▼5.50
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0067.92 ▼16.3892.73 ▼1.78
Add New Post /wp-admin/post-new.php1,683 ▲6818.39 ▼2.96459.25 ▲119.40167.62 ▲57.92
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.02180.22 ▲30.41127.01 ▲5.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require(/includes/ago.php): failed to open stream: No such file or directory in wp-content/plugins/big-red-button/big-red-button.php on line 13
    • > PHP Fatal error
      require(): Failed opening required '/includes/ago.php' (include_path='.:/usr/share/php') in wp-content/plugins/big-red-button/big-red-button.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Big Red Button in the sidebar), #2 (Widget administration)
You can look at the official readme.txt

big-red-button/big-red-button.php Passed 13 tests

Analyzing the main PHP file in "Big Red Button" version 1.1
103 characters long description:
A simple widget that displays a big red button. A message will be shown when someone clicks the button.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin104 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33318104

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
big-red-button.png8.48KB4.81KB▼ 43.32%
screenshot-1.png17.28KB7.42KB▼ 57.08%
screenshot-2.png11.17KB6.20KB▼ 44.46%