79% signal-flags

Code Review | Signal Flags

WordPress plugin Signal Flags scored79%from 54 tests.

About plugin

  • Plugin page: signal-flags
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Jul 9, 2020
  • Latest release: Sep 3, 2020
  • Number of updates: 8
  • Update frequency: every 7.1 days
  • Top authors: opensums (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /488 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.70ms] Passed 4 tests

Analyzing server-side resources used by Signal Flags
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.58 ▲2.31
Dashboard /wp-admin3.35 ▲0.0545.04 ▲3.89
Posts /wp-admin/edit.php3.46 ▲0.1145.37 ▼0.63
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.50 ▼7.36
Media Library /wp-admin/upload.php3.27 ▲0.0434.86 ▲2.87
Signal Flags /wp-admin/options-general.php?page=signal-flags-admin3.2733.60

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Signal Flags
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.25 ▼1.341.76 ▼0.0744.42 ▲3.10
Dashboard /wp-admin2,210 ▲245.77 ▲0.8393.81 ▼18.1838.54 ▼3.48
Posts /wp-admin/edit.php2,090 ▲12.03 ▲0.0235.40 ▼3.8732.17 ▲0.96
Add New Post /wp-admin/post-new.php1,536 ▲2223.14 ▲5.63652.03 ▼31.3255.47 ▼11.12
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.00103.14 ▼5.3050.23 ▲5.51
Signal Flags /wp-admin/options-general.php?page=signal-flags-admin1,5652.1532.6235.07

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/signal-flags/templates/admin/settings-page-sections.tpl.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/signal-flags/templates/admin/settings-page-sections.tpl.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'SignalFlagsPlugin\\WpPlugin\\Admin' not found in wp-content/plugins/signal-flags/src/Admin.php:19
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/signal-flags/templates/admin/settings-page-sections.tpl.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'SignalFlagsPlugin\\WpPlugin\\AdminPage' not found in wp-content/plugins/signal-flags/src/AdminPage.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/signal-flags/templates/admin/settings-page.tpl.php:26
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/signal-flags/templates/admin/settings-page-sections.tpl.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'SignalFlagsPlugin\\WpPlugin\\Plugin' not found in wp-content/plugins/signal-flags/src/Plugin.php:9
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/signal-flags/templates/admin/settings-page-sections.tpl.php on line 20

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: signal flags, flags, sailing, code flag

signal-flags/signal-flags.php Passed 13 tests

The entry point to "Signal Flags" version 1.1.1 is a PHP file that has certain tags in its header comment area
68 characters long description:
Display signal flags (ICS) and other nautical flags on your website.

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
Good job! No executable or dangerous file extensions detected2,795 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP211762602,795

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.11
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods59
▷ Static methods35.08%
▷ Public methods4881.36%
▷ Protected methods1118.64%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.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
There were not PNG files found in your plugin