83% alphabetic-pagination

Code Review | Alphabetic Pagination

WordPress plugin Alphabetic Pagination scored83%from 54 tests.

About plugin

  • Plugin page: alphabetic-pagina...
  • Plugin version: 3.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2013
  • Latest release: Nov 22, 2023
  • Number of updates: 241
  • Update frequency: every 15.9 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

79 reviews

Install metrics

700+ active /74,981 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲2.98ms] Passed 4 tests

Server-side resources used by Alphabetic Pagination
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.17 ▲0.35
Dashboard /wp-admin3.36 ▲0.0652.50 ▲3.42
Posts /wp-admin/edit.php3.41 ▲0.0551.99 ▲3.19
Add New Post /wp-admin/post-new.php5.97 ▲0.09100.66 ▲4.95
Media Library /wp-admin/upload.php3.29 ▲0.0641.60 ▲6.13
Alphabetic Pagination /wp-admin/options-general.php?page=alphabetic_pagination3.6346.51

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
alphabetic_pagination_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Alphabetic Pagination: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16213.38 ▼0.698.85 ▲7.1237.69 ▼7.82
Dashboard /wp-admin2,207 ▲305.61 ▼0.0294.69 ▼6.0840.81 ▼4.37
Posts /wp-admin/edit.php2,118 ▲182.04 ▲0.0740.74 ▲1.3636.02 ▲4.03
Add New Post /wp-admin/post-new.php1,540 ▲423.18 ▼0.16666.66 ▲15.8357.61 ▲8.19
Media Library /wp-admin/upload.php1,409 ▲154.16 ▼0.1296.32 ▼3.6443.17 ▼1.26
Alphabetic Pagination /wp-admin/options-general.php?page=alphabetic_pagination3,69916.10533.6862.34

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • alphabetic_pagination_options
    • theysaidso_admin_options
    • 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 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alphabetic-pagination/inc/logger.php:2

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: chameleon, posts pagination, sorting, alphabetic, pagination...

alphabetic-pagination/index.php 85% from 13 tests

"Alphabetic Pagination" version 3.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("alphabetic-pagination.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)

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
Everything looks great! No dangerous files found in this plugin13,750 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,445
PHP61,1162122,229
CSS723020978
PO File3225234552
JavaScript5131122546

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions62
▷ Named functions6198.39%
▷ Anonymous functions11.61%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.65MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/googplay.png12.88KB6.13KB▼ 52.38%
images/pagi-item-selected-bg.png1.34KB0.85KB▼ 36.75%
images/reset-light.png0.52KB0.54KB0.00%
images/ap-banner.png635.08KB227.96KB▼ 64.11%
images/reset-dark.png0.65KB0.54KB▼ 17.94%