84% hello-navi

Code Review | hello_navi

WordPress plugin hello_navi scored84%from 54 tests.

About plugin

  • Plugin page: hello-navi
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2016
  • Latest release: Mar 12, 2016
  • Number of updates: 11
  • Update frequency: every 0.2 days
  • Top authors: roiarthurb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /843 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by hello_navi
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.28 ▼1.55
Dashboard /wp-admin3.31 ▲0.0145.95 ▼2.69
Posts /wp-admin/edit.php3.36 ▲0.0147.64 ▼1.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.60 ▼7.51
Media Library /wp-admin/upload.php3.24 ▲0.0137.12 ▲1.98

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

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

Browser metrics Passed 4 tests

hello_navi: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.22 ▼1.161.63 ▼0.0240.79 ▼0.15
Dashboard /wp-admin2,212 ▲204.87 ▼0.10107.71 ▼5.7842.14 ▼3.18
Posts /wp-admin/edit.php2,094 ▲22.01 ▼0.0439.75 ▼1.1035.08 ▼0.87
Add New Post /wp-admin/post-new.php1,590 ▲4722.64 ▲4.37645.47 ▲7.3143.63 ▼7.04
Media Library /wp-admin/upload.php1,391 ▼04.28 ▲0.11107.30 ▲7.3653.45 ▲6.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 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/hello-navi/hello_navi.php:204

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 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: admin, useless

hello-navi/hello_navi.php 85% from 13 tests

The main PHP file in "hello_navi" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 280 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("hello-navi.php" instead of "hello_navi.php")

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
No dangerous file extensions were detected197 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1920197

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin