74% pirates-ahoy

Code Review | Pirates Ahoy!

WordPress plugin Pirates Ahoy! scored74%from 54 tests.

About plugin

  • Plugin page: pirates-ahoy
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.1
  • WordPress version: 6.3.1
  • First release: Feb 13, 2010
  • Latest release: Nov 21, 2014
  • Number of updates: 10
  • Update frequency: every 175.7 days
  • Top authors: johnny5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,377 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.88MB] [CPU: ▼55.84ms] Passed 4 tests

A check of server-side resources used by Pirates Ahoy!
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.354.94 ▼30.74
Dashboard /wp-admin2.13 ▼1.215.49 ▼52.81
Posts /wp-admin/edit.php2.13 ▼1.226.78 ▼38.15
Add New Post /wp-admin/post-new.php2.13 ▼3.756.99 ▼101.67
Media Library /wp-admin/upload.php2.13 ▼1.095.71 ▼27.11

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pirates Ahoy!
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.32 ▼1.271.78 ▲0.1441.86 ▲2.94
Dashboard /wp-admin2,231 ▲434.85 ▼0.08109.19 ▲2.8341.39 ▼1.54
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0534.31 ▲0.7832.03 ▼2.76
Add New Post /wp-admin/post-new.php1,547 ▲3323.28 ▲5.54642.71 ▲34.0893.29 ▲40.33
Media Library /wp-admin/upload.php1,388 ▲64.24 ▲0.0499.80 ▲0.6343.66 ▲0.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+312
    Non-static method Pirates_Ahoy::gettext() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pirates-ahoy/pirates-ahoy.php:192

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === pirates-ahoy === )
The official readme.txt might help

pirates-ahoy/pirates-ahoy.php Passed 13 tests

The main PHP script in "Pirates Ahoy!" version 0.1 is automatically included on every request by WordPress
37 characters long description:
Speak like a pirate, you land lubber!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected153 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12526150
Markdown1103

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity2.00
▷ Maximum method complexity8.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%
Functions0
▷ Named functions00.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
No PNG files were detected