84% simple-ajax-pagination

Code Review | Simple Ajax Pagination

WordPress plugin Simple Ajax Pagination scored84%from 54 tests.

About plugin

  • Plugin page: simple-ajax-pagin...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.3.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Feb 17, 2020
  • Number of updates: 18
  • Update frequency: every 13.9 days
  • Top authors: milanhirapra1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,116 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.02ms] Passed 4 tests

A check of server-side resources used by Simple Ajax Pagination
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.04 ▼0.56
Dashboard /wp-admin3.32 ▼0.0243.88 ▼14.45
Posts /wp-admin/edit.php3.37 ▲0.0246.37 ▲1.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.01 ▼22.24
Media Library /wp-admin/upload.php3.24 ▲0.0135.83 ▲1.67
SA Pagination /wp-admin/options-general.php?page=sap-pagination-settings3.2631.16

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Ajax Pagination
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲14413.34 ▼1.387.82 ▲5.7839.66 ▼5.28
Dashboard /wp-admin2,201 ▲215.58 ▼0.1080.83 ▼16.3638.09 ▼6.69
Posts /wp-admin/edit.php2,106 ▲62.00 ▼0.0239.81 ▲3.4234.95 ▲0.13
Add New Post /wp-admin/post-new.php1,531 ▲323.07 ▲0.02650.84 ▼14.8279.55 ▲24.16
Media Library /wp-admin/upload.php1,406 ▲64.23 ▼0.0395.72 ▼19.2441.88 ▼6.31
SA Pagination /wp-admin/options-general.php?page=sap-pagination-settings9022.0325.3528.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/simple-ajax-pagination/includes/admin/sap-settings.tpl.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: ajax pagination, ajax, pagination, wordpress ajax pagination, wordpress ajax

simple-ajax-pagination/simple-ajax-pagination.php Passed 13 tests

"Simple Ajax Pagination" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
44 characters long description:
Simple ajax pagination without any hard code

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin668 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP920719513
JSON100124
SVG118030
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.00
▷ Minimum class complexity2.00
▷ Maximum class complexity22.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes240.00%
Methods33
▷ Static methods721.21%
▷ Public methods3090.91%
▷ Protected methods13.03%
▷ Private methods26.06%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin