94% fight-on

Code Review | Fight On

WordPress plugin Fight On scored 94% from 54 tests.

About plugin

  • Plugin page: fight-on
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.3
  • WordPress version: 5.8.1
  • First release: Oct 4, 2019
  • Latest release: Oct 4, 2019
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: kylewilson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 267 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼138.65ms] Passed 4 tests

This is a short check of server-side resources used by Fight On
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0138.98 ▲7.82
Dashboard /wp-admin3.06 ▲0.0153.81 ▲11.54
Posts /wp-admin/edit.php3.12 ▲0.0145.60 ▼1.83
Add New Post /wp-admin/post-new.php5.42 ▼0.0193.75 ▼557.94
Media Library /wp-admin/upload.php3.01 ▲0.0133.48 ▼2.63

Server storage [IO: ▲0.00MB] [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, no new options

Browser metrics Passed 4 tests

Fight On: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9315.83 ▲0.318.40 ▼0.1347.90 ▼1.05
Dashboard /wp-admin2,980 ▲495.88 ▼0.09151.26 ▼13.01124.60 ▲3.37
Posts /wp-admin/edit.php2,746 ▲72.70 ▲0.0171.92 ▼0.4992.44 ▼1.63
Add New Post /wp-admin/post-new.php1,508 ▼2,12818.62 ▲3.75409.44 ▼70.63104.92 ▼13.42
Media Library /wp-admin/upload.php1,817 ▲75.04 ▲0.02145.29 ▼15.70131.62 ▲7.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

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
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
  • 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/fight-on/fighton.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
There were not plugin tags detected

fight-on/fighton.php 85% from 13 tests

The main PHP script in "Fight On" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fight-on.php" instead of "fighton.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 178 characters long)

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 detected55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181955

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin