83% captain-up

Code Review | Captain Up

WordPress plugin Captain Up scored83%from 54 tests.

About plugin

  • Plugin page: captain-up
  • Plugin version: 3.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2013
  • Latest release: Jan 17, 2023
  • Number of updates: 45
  • Update frequency: every 80.3 days
  • Top authors: cptup (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

20+ active /14,148 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.05ms] Passed 4 tests

A check of server-side resources used by Captain Up
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.97 ▼1.30
Dashboard /wp-admin3.39 ▲0.0443.54 ▼17.41
Posts /wp-admin/edit.php3.50 ▲0.1549.98 ▲4.95
Add New Post /wp-admin/post-new.php5.97 ▲0.0891.73 ▼9.46
Media Library /wp-admin/upload.php3.31 ▲0.0835.29 ▲3.99

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_cptup_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Captain Up
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.47 ▲0.151.61 ▼0.1739.41 ▼3.04
Dashboard /wp-admin2,219 ▲375.79 ▼0.0993.44 ▼13.8740.02 ▼3.68
Posts /wp-admin/edit.php2,105 ▲162.06 ▲0.0139.93 ▲1.1635.01 ▲2.21
Add New Post /wp-admin/post-new.php1,549 ▲723.58 ▲5.09609.55 ▲10.0357.72 ▲6.37
Media Library /wp-admin/upload.php1,401 ▲164.19 ▲0.0293.05 ▼6.4243.58 ▼2.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_cptup_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/captain-up/captainup.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

captain-up/captainup.php 85% from 13 tests

The primary PHP file in "Captain Up" version 3.0.10 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 253 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("captain-up.php" instead of "captainup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,383 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5133267593
CSS14041558
Markdown11180127
JavaScript22690105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods11
▷ Static methods763.64%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.35MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/getting-started-points.png14.33KB5.23KB▼ 63.49%
img/cptup_logo_64.png3.58KB1.63KB▼ 54.39%
banner-1544x500.png76.74KB35.33KB▼ 53.96%
banner-772x250.png20.28KB8.67KB▼ 57.23%
img/grandpa-captain.png47.86KB20.90KB▼ 56.33%