84% aw-simple-sorter

Code Review | AW Simple Sorter

WordPress plugin AW Simple Sorter scored84%from 54 tests.

About plugin

  • Plugin page: aw-simple-sorter
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-4.7.1
  • WordPress version: 6.3.1
  • First release: Apr 27, 2015
  • Latest release: Jan 25, 2017
  • Number of updates: 34
  • Update frequency: every 19.2 days
  • Top authors: awarren (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,607 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.09ms] Passed 4 tests

An overview of server-side resources used by AW Simple Sorter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.45 ▼3.13
Dashboard /wp-admin3.37 ▲0.0345.11 ▼14.60
Posts /wp-admin/edit.php3.42 ▲0.0646.40 ▲2.75
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.96 ▼15.12
Media Library /wp-admin/upload.php3.29 ▲0.0633.92 ▲0.51
Documentation /wp-admin/edit.php?post_type=awsimplesorter&page=aw-simple-sorter/aw-ss-docs.php3.2730.28
Options /wp-admin/edit.php?post_type=awsimplesorter&page=aw-simple-sorter/aw-ss-options.php3.2631.92
Simple Sorter /wp-admin/edit.php?post_type=awsimplesorter3.3336.49
AW SS Categories /wp-admin/edit-tags.php?taxonomy=awsscategories&post_type=awsimplesorter3.2934.61
Add New /wp-admin/post-new.php?post_type=awsimplesorter3.4148.20

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by AW Simple Sorter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.26 ▼1.171.76 ▲0.1341.49 ▲0.20
Dashboard /wp-admin2,244 ▲525.86 ▲0.8997.99 ▼8.1987.91 ▲42.86
Posts /wp-admin/edit.php2,133 ▲441.99 ▼0.0239.46 ▲0.6633.83 ▲0.18
Add New Post /wp-admin/post-new.php1,546 ▲1223.23 ▲0.22710.65 ▲42.3066.88 ▲9.60
Media Library /wp-admin/upload.php1,429 ▲414.13 ▼0.11109.34 ▼2.2244.04 ▼6.05
Documentation /wp-admin/edit.php?post_type=awsimplesorter&page=aw-simple-sorter/aw-ss-docs.php1,0912.0626.1138.80
Options /wp-admin/edit.php?post_type=awsimplesorter&page=aw-simple-sorter/aw-ss-options.php9722.0225.3126.20
Simple Sorter /wp-admin/edit.php?post_type=awsimplesorter1,0882.0132.6726.54
AW SS Categories /wp-admin/edit-tags.php?taxonomy=awsscategories&post_type=awsimplesorter1,3002.1425.2829.61
Add New /wp-admin/post-new.php?post_type=awsimplesorter2,2727.65164.43117.04

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Please fix the following
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: chosenUIeffect in wp-content/plugins/aw-simple-sorter/aw-ss-effect-switch.php on line 38
    • > PHP Notice
      Undefined variable: chosenUIeffect in wp-content/plugins/aw-simple-sorter/aw-ss-effect-switch.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/aw-simple-sorter/aw-ss-options.php:24
    • > PHP Notice
      Undefined variable: chosenUIeffect in wp-content/plugins/aw-simple-sorter/aw-ss-effect-switch.php on line 6
    • > PHP Notice
      Undefined variable: chosenUIeffect in wp-content/plugins/aw-simple-sorter/aw-ss-effect-switch.php on line 42
    • > PHP Notice
      Undefined variable: chosenUIeffect in wp-content/plugins/aw-simple-sorter/aw-ss-effect-switch.php on line 14
    • > PHP Notice
      Undefined variable: chosenUIeffect in wp-content/plugins/aw-simple-sorter/aw-ss-effect-switch.php on line 50
    • > PHP Notice
      Undefined variable: chosenUIeffect in wp-content/plugins/aw-simple-sorter/aw-ss-effect-switch.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/aw-simple-sorter/aw-ss-docs.php:24
    • > PHP Notice
      Undefined variable: chosenUIeffect in wp-content/plugins/aw-simple-sorter/aw-ss-effect-switch.php on line 26

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: simple sorter, quicksand, responsive portfolio, responsive, portfolio...

aw-simple-sorter/aw-simple-sorter.php Passed 13 tests

The principal PHP file in "AW Simple Sorter" v. 0.5 is loaded by WordPress automatically on each request
69 characters long description:
Simple sorting of a post type to be used in a portfolio type scenario

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin462 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP417953382
JavaScript117544
CSS1361636

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.38
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/layers.png0.58KB0.99KB0.00%
img/triangle.png0.33KB0.33KB▼ 0.88%