83% sort-me-this

Code Review | SortMeThis

WordPress plugin SortMeThis scored 83% from 54 tests.

About plugin

  • Plugin page: sort-me-this
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Nov 20, 2020
  • Latest release: Oct 3, 2021
  • Number of updates: 10
  • Update frequency: every 32.0 days
  • Top authors: algaweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 138 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼144.10ms] Passed 4 tests

This is a short check of server-side resources used by SortMeThis
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0433.80 ▼1.59
Dashboard /wp-admin3.11 ▲0.0547.94 ▼6.24
Posts /wp-admin/edit.php3.16 ▲0.0545.43 ▼2.60
Add New Post /wp-admin/post-new.php5.47 ▲0.0396.67 ▼564.04
Media Library /wp-admin/upload.php3.05 ▲0.0529.61 ▼3.52
Media /wp-admin/admin.php?page=sort-me-this3.0929.64
Media Categories /wp-admin/admin.php?page=sort-me-this-media-categories3.0928.72

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 2 new options
New WordPress options
cmc-fv
smt-media-categories

Browser metrics Passed 4 tests

This is an overview of browser requirements for SortMeThis
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,845 ▲25016.93 ▲1.2516.27 ▲6.9746.52 ▼4.21
Dashboard /wp-admin3,018 ▲876.75 ▲0.77151.62 ▼5.77130.29 ▲24.08
Posts /wp-admin/edit.php2,795 ▲562.75 ▼0.0972.64 ▲0.6687.98 ▼0.66
Add New Post /wp-admin/post-new.php1,727 ▲4418.83 ▲0.12397.68 ▼17.09139.03 ▲30.93
Media Library /wp-admin/upload.php1,803 ▼45.38 ▲0.34155.04 ▼6.22133.80 ▲16.98
Media /wp-admin/admin.php?page=sort-me-this1,7294.5497.68140.08
Media Categories /wp-admin/admin.php?page=sort-me-this-media-categories1,3452.5857.24112.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=sort-me-this
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/sort-me-this/admin/class-sort-me-this-admin.php+258
    Undefined variable: pag_container

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sort-me-this/public/partials/sort-me-this-public-display.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sort-me-this/admin/partials/sort-me-this-admin-display-categories.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sort-me-this/admin/partials/sort-me-this-admin-display-media.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
9 plugin tags: picture sorter, media organizer, organize media, documents sorter, sort media...

sort-me-this/sort-me-this.php Passed 13 tests

The entry point to "SortMeThis" version 1.0.1 is a PHP file that has certain tags in its header comment area
83 characters long description:
This plugin allows you to fully manage, filter and organize your media in easy way.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin10,219 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript69591,7105,028
CSS81141443,635
PHP13210594816
LESS96861740

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.86
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.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
9 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
admin/css/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
admin/css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
admin/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
admin/css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%