89% gnarly-frontend-page-sorter

Code Review | Gnarly Frontend Page Sort

WordPress plugin Gnarly Frontend Page Sort scored89%from 54 tests.

About plugin

  • Plugin page: gnarly-frontend-p...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 25, 2014
  • Latest release: Jul 18, 2014
  • Number of updates: 32
  • Update frequency: every 0.7 days
  • Top authors: olie480 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,188 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.09ms] Passed 4 tests

Server-side resources used by Gnarly Frontend Page Sort
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.82 ▼3.70
Dashboard /wp-admin3.32 ▲0.0242.97 ▼8.89
Posts /wp-admin/edit.php3.38 ▲0.0249.50 ▲3.91
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.57 ▼5.35
Media Library /wp-admin/upload.php3.25 ▲0.0237.64 ▲1.60

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Gnarly Frontend Page Sort: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.86 ▼0.659.32 ▲7.5839.86 ▼4.04
Dashboard /wp-admin2,192 ▲125.57 ▼0.0481.39 ▼5.8141.11 ▼0.33
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0434.85 ▼2.2235.16 ▼6.22
Add New Post /wp-admin/post-new.php1,526 ▼022.94 ▼0.05640.05 ▼29.9454.28 ▼4.10
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.0198.61 ▼12.9543.74 ▼4.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Screenshots to come!)
The official readme.txt is a good inspiration

gnarly-frontend-page-sorter/gnarly-frontend-page-sort.php 77% from 13 tests

This is the main PHP file of "Gnarly Frontend Page Sort" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gnarly-frontend-page-sorter.php" instead of "gnarly-frontend-page-sort.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin118 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1482085
JavaScript122233

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin