84% the-force

Code Review | The Force

WordPress plugin The Force scored84%from 54 tests.

About plugin

  • Plugin page: the-force
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Nov 25, 2015
  • Latest release: Dec 7, 2016
  • Number of updates: 19
  • Update frequency: every 28.1 days
  • Top authors: Rohittm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,693 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.00MB] [CPU: ▼8.43ms] Passed 4 tests

Analyzing server-side resources used by The Force
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.10 ▼4.27
Dashboard /wp-admin3.32 ▼0.0346.01 ▼9.95
Posts /wp-admin/edit.php3.37 ▲0.0149.66 ▼1.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.29 ▼16.75
Media Library /wp-admin/upload.php3.24 ▲0.0132.62 ▼2.73

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

Input-output and database impact 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
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for The Force
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.42 ▲0.251.77 ▲0.0039.59 ▼3.37
Dashboard /wp-admin2,215 ▲275.83 ▲0.9494.74 ▼11.6341.14 ▼2.96
Posts /wp-admin/edit.php2,091 ▲22.02 ▲0.0137.50 ▼4.5234.31 ▼1.57
Add New Post /wp-admin/post-new.php1,589 ▲6921.55 ▼1.73637.88 ▼6.9946.23 ▼4.06
Media Library /wp-admin/upload.php1,394 ▲64.16 ▼0.0694.88 ▼12.9539.48 ▼4.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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 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/the-force/The_Force.php:80

User-side errors Passed 1 test

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

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
4 plugin tags: hello dolly, star wars, force, the dark side

the-force/The_Force.php 85% from 13 tests

"The Force" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 218 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("the-force.php" instead of "The_Force.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192073

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
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
PNG images were not found in this plugin