84% loft404

Code Review | Loft404

WordPress plugin Loft404 scored84%from 54 tests.

About plugin

  • Plugin page: loft404
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.5
  • WordPress version: 6.3.1
  • First release: Mar 15, 2016
  • Latest release: Jun 10, 2016
  • Number of updates: 17
  • Update frequency: every 5.1 days
  • Top authors: loftocean (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.28ms] Passed 4 tests

A check of server-side resources used by Loft404
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.90 ▲4.13
Dashboard /wp-admin3.34 ▲0.0353.37 ▼3.55
Posts /wp-admin/edit.php3.39 ▲0.0348.55 ▲0.45
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.70 ▼6.37
Media Library /wp-admin/upload.php3.26 ▲0.0337.51 ▲0.34
Loft404 /wp-admin/options-general.php?page=loft404-settings3.2435.09

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
loft404_plugin_version

Browser metrics Passed 4 tests

Loft404: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.251.93 ▲0.2145.34 ▼2.48
Dashboard /wp-admin2,196 ▲195.62 ▲0.0391.76 ▼3.8343.16 ▲0.86
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0139.26 ▲1.7033.79 ▼2.98
Add New Post /wp-admin/post-new.php1,539 ▲1118.30 ▼5.00653.43 ▼19.1466.25 ▲21.22
Media Library /wp-admin/upload.php1,398 ▼24.23 ▲0.0898.34 ▲1.3844.25 ▲2.71
Loft404 /wp-admin/options-general.php?page=loft404-settings8141.9922.5926.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • loft404_plugin_version
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/loft404/class-loft-404-front.php
    • > /wp-content/plugins/loft404/loft404.php
    • > /wp-content/plugins/loft404/class-loft-404-settings.php

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

loft404/loft404.php Passed 13 tests

The entry point to "Loft404" version 1.2.2 is a PHP file that has certain tags in its header comment area
60 characters long description:
A toolkit to redirect the default 404 page to a custom page.

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
No dangerous file extensions were detected141 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31199141

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.33
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected