84% local-indicator

Code Review | Local Indicator

WordPress plugin Local Indicator scored 84% from 54 tests.

About plugin

  • Plugin page: local-indicator
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Aug 29, 2012
  • Latest release: Oct 8, 2013
  • Number of updates: 21
  • Update frequency: every 19.3 days
  • Top authors: TJNowell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,904 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Local Indicator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.49 ▼7.48
Dashboard /wp-admin3.32 ▲0.0144.03 ▼1.55
Posts /wp-admin/edit.php3.37 ▲0.0145.99 ▼2.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.48 ▼12.80
Media Library /wp-admin/upload.php3.24 ▲0.0133.42 ▼2.43

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Local Indicator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲7213.64 ▼0.731.63 ▼0.2240.40 ▼6.04
Dashboard /wp-admin2,226 ▲384.83 ▼1.07113.37 ▲4.6647.17 ▲1.48
Posts /wp-admin/edit.php2,112 ▲232.05 ▲0.0240.20 ▼2.5036.69 ▲0.86
Add New Post /wp-admin/post-new.php1,551 ▲1823.08 ▼0.54591.81 ▲3.6452.07 ▲3.00
Media Library /wp-admin/upload.php1,405 ▲174.23 ▲0.0497.41 ▼1.1344.34 ▲0.75

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
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 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/local-indicator/local-indicator.php:108

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: admin, development, maintenance

local-indicator/local-indicator.php Passed 13 tests

The main PHP file in "Local Indicator" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
134 characters long description:
Indicates the current server used via a colour coded IP in the top admin bar, useful for telling live and Local dev environments apart

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12812181
JSON10016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods360.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin