83% archive-posts-sort-customize

Code Review | Archive Posts Sort Customize

WordPress plugin Archive Posts Sort Customize scored83%from 54 tests.

About plugin

  • Plugin page: archive-posts-sor...
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.3
  • WordPress version: 6.3.1
  • First release: Apr 12, 2013
  • Latest release: Sep 24, 2015
  • Number of updates: 45
  • Update frequency: every 19.9 days
  • Top authors: gqevu6bsiz (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

900+ active /16,450 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.40MB] [CPU: ▼2.99ms] Passed 4 tests

An overview of server-side resources used by Archive Posts Sort Customize
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3042.44 ▼2.58
Dashboard /wp-admin3.74 ▲0.4349.75 ▼1.23
Posts /wp-admin/edit.php3.79 ▲0.4352.80 ▼0.08
Add New Post /wp-admin/post-new.php6.32 ▲0.4494.52 ▼8.06
Media Library /wp-admin/upload.php3.67 ▲0.4445.65 ▲8.19

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Archive Posts Sort Customize
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲3414.69 ▲0.331.69 ▼0.1546.07 ▲4.25
Dashboard /wp-admin2,211 ▲345.62 ▲0.0490.72 ▼2.9438.78 ▼5.44
Posts /wp-admin/edit.php2,116 ▲162.00 ▲0.0136.67 ▼0.7233.64 ▼5.24
Add New Post /wp-admin/post-new.php1,539 ▲1323.35 ▲0.48667.33 ▲26.6558.18 ▲8.58
Media Library /wp-admin/upload.php1,410 ▲134.18 ▼0.0296.63 ▼6.4341.96 ▼4.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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 following issues need your attention
  • 43× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to get property 'main_slug' of non-object in wp-content/plugins/archive-posts-sort-customize/admin/view/home.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'APSC_Model_Archive' not found in wp-content/plugins/archive-posts-sort-customize/model/home.php:5
    • > PHP Notice
      Undefined variable: APSC in wp-content/plugins/archive-posts-sort-customize/admin/view/search.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/archive-posts-sort-customize/admin/view/home.php:3
    • > PHP Notice
      Trying to get property 'main_slug' of non-object in wp-content/plugins/archive-posts-sort-customize/admin/view/elements/information.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'APSC_Model_Archive' not found in wp-content/plugins/archive-posts-sort-customize/model/search.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/archive-posts-sort-customize/controller/debug-bar.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/archive-posts-sort-customize/front/master.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/archive-posts-sort-customize/core/init.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'APSC_Model_Home' not found in wp-content/plugins/archive-posts-sort-customize/admin/manager-archive-tab-home.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Settings Interface), #2 (Support the ignore words for title order sort.), #3 (Support the custom fields order sort.), #4 (Support the individual term sort settings.)
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can take inspiration from this readme.txt

archive-posts-sort-customize/archive-posts-sort-customize.php 92% from 13 tests

The main file in "Archive Posts Sort Customize" v. 1.6.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:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,961 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP322,045402,747
PO File164107149
CSS111061
JavaScript2104

PHP code Passed 2 tests

Analyzing 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.26
Average class complexity11.19
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes311.54%
▷ Concrete classes2388.46%
▷ Final classes23100.00%
Methods173
▷ Static methods00.00%
▷ Public methods13879.77%
▷ Protected methods105.78%
▷ Private methods2514.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png22.57KB9.18KB▼ 59.31%
screenshot-2.png24.30KB9.20KB▼ 62.15%
screenshot-4.png49.99KB18.09KB▼ 63.82%
screenshot-1.png46.84KB16.29KB▼ 65.22%