83% wp-enviroment-beacon

Code Review | Wordpress Environment Beacon

WordPress plugin Wordpress Environment Beacon scored83%from 54 tests.

About plugin

  • Plugin page: wp-enviroment-beacon
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 5, 2013
  • Latest release: Jun 16, 2015
  • Number of updates: 20
  • Update frequency: every 34.0 days
  • Top authors: joelgarciajr84 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,772 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▲2.04ms] Passed 4 tests

A check of server-side resources used by Wordpress Environment Beacon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.56 ▼0.12
Dashboard /wp-admin3.43 ▲0.1247.87 ▼2.46
Posts /wp-admin/edit.php3.48 ▲0.1250.60 ▲6.66
Add New Post /wp-admin/post-new.php6.01 ▲0.13100.69 ▲11.57
Media Library /wp-admin/upload.php3.35 ▲0.1236.64 ▲4.09
PHP Info /wp-admin/edit.php?post_type=phpinfo3.3937.59
Enviroment Settings /wp-admin/edit.php?post_type=whoami3.4037.25

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress Environment Beacon
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲13413.13 ▼1.254.44 ▲2.6641.06 ▼2.55
Dashboard /wp-admin2,253 ▲655.87 ▲0.06106.85 ▼8.4472.17 ▲25.39
Posts /wp-admin/edit.php2,136 ▲472.00 ▼0.0338.43 ▲3.9637.55 ▼0.72
Add New Post /wp-admin/post-new.php1,563 ▲2523.13 ▼0.18744.55 ▲162.7753.60 ▼7.77
Media Library /wp-admin/upload.php1,438 ▲474.22 ▼0.0294.47 ▼6.4079.28 ▲33.18
PHP Info /wp-admin/edit.php?post_type=phpinfo1,1101.9331.8325.59
Enviroment Settings /wp-admin/edit.php?post_type=whoami1,1531.9535.5728.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-enviroment-beacon/custom-post-types/cpt-phpinfo.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-enviroment-beacon/confs/save-button.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-enviroment-beacon/custom-post-types/cpt-show-status.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-enviroment-beacon/confs/remove-publish-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-enviroment-beacon/custom-post-types/cpt-show-status.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-enviroment-beacon/confs/menu-page.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Home Wordpress with plugin enabled - see the lower left corner of the menu.), #2 (Wordpress enviroment information saved - In the above example we used the godaddy.), #3 (The second part of the above example.), #4 (All Wordpress settings options (enjoy)!), #5 (All php settings from the Wordpress enviroment phpinfo.)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-enviroment-beacon === )
The official readme.txt might help

wp-enviroment-beacon/wordpress-enviroment-beacon.php 77% from 13 tests

"Wordpress Environment Beacon" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 168 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-enviroment-beacon.php" instead of "wordpress-enviroment-beacon.php")

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
Everything looks great! No dangerous files found in this plugin334 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP85818334

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.69MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png90.73KB28.87KB▼ 68.18%
screenshot-2.png239.63KB83.31KB▼ 65.24%
screenshot-4.png99.20KB34.55KB▼ 65.18%
screenshot-1.png107.91KB35.50KB▼ 67.11%
screenshot-5.png167.00KB42.82KB▼ 74.36%