84% my-sites-sort-and-filter

Code Review | My Sites Sort and Filter

WordPress plugin My Sites Sort and Filter scored84%from 54 tests.

About plugin

  • Plugin page: my-sites-sort-and...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Sep 15, 2018
  • Latest release: Oct 28, 2018
  • Number of updates: 9
  • Update frequency: every 4.9 days
  • Top authors: hendridm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,046 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.05ms] Passed 4 tests

A check of server-side resources used by My Sites Sort and Filter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.84 ▲2.03
Dashboard /wp-admin3.31 ▲0.0047.46 ▼8.07
Posts /wp-admin/edit.php3.36 ▲0.0048.49 ▲1.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.53 ▼13.89
Media Library /wp-admin/upload.php3.23 ▲0.0036.60 ▲0.31

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 126 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for My Sites Sort and Filter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.23 ▼1.331.70 ▼0.3043.15 ▼0.36
Dashboard /wp-admin2,221 ▲155.84 ▼0.0197.94 ▼10.3038.88 ▼2.13
Posts /wp-admin/edit.php2,103 ▲61.97 ▼0.0440.57 ▲1.8534.29 ▲0.09
Add New Post /wp-admin/post-new.php1,531 ▼023.07 ▼0.22665.84 ▲7.5554.61 ▲5.30
Media Library /wp-admin/upload.php1,394 ▼94.20 ▼0.0399.21 ▼5.9144.49 ▼3.35

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please take a closer look at the following
  • 91× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/my-sites-sort-and-filter/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php:8

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: sort, multisite, network, filter, search...

my-sites-sort-and-filter/my-sites-sort-filter.php 85% from 13 tests

The main file in "My Sites Sort and Filter" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("my-sites-sort-and-filter.php" instead of "my-sites-sort-filter.php")
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,911 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP1035347982,391
JSON400298
PO File64055222

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity2.91
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes97
▷ Abstract classes11.03%
▷ Concrete classes9698.97%
▷ Final classes00.00%
Methods133
▷ Static methods32.26%
▷ Public methods9571.43%
▷ Protected methods3123.31%
▷ Private methods75.26%
Functions9
▷ Named functions222.22%
▷ Anonymous functions777.78%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin