83% custom-post-type-ajax-pagnaition

Code Review | CPTA Pagination

WordPress plugin CPTA Pagination scored83%from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: Nov 9, 2016
  • Latest release: Mar 13, 2021
  • Number of updates: 25
  • Update frequency: every 72.0 days
  • Top authors: cnaveenkumar (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /7,902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by CPTA Pagination
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0437.83 ▼5.57
Dashboard /wp-admin3.39 ▲0.0450.74 ▼3.33
Posts /wp-admin/edit.php3.44 ▲0.0450.59 ▼0.99
Add New Post /wp-admin/post-new.php5.97 ▲0.0495.98 ▼2.05
Media Library /wp-admin/upload.php3.31 ▲0.0440.97 ▲2.93

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

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

Browser metrics Passed 4 tests

A check of browser resources used by CPTA Pagination
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.261.63 ▼0.1837.87 ▼11.81
Dashboard /wp-admin2,192 ▲155.55 ▼0.0489.60 ▼0.7738.40 ▼7.69
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0438.29 ▼0.0436.41 ▼0.82
Add New Post /wp-admin/post-new.php1,526 ▼823.18 ▲4.83683.91 ▲23.9458.14 ▼10.86
Media Library /wp-admin/upload.php1,400 ▼34.12 ▼0.09111.34 ▲9.3546.70 ▼0.36

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/custom-post-type-ajax-pagnaition/cptapagination-init.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === custom-post-type-ajax-pagnaition === )
You can take inspiration from this readme.txt

custom-post-type-ajax-pagnaition/cptapagination-init.php 92% from 13 tests

Analyzing the main PHP file in "CPTA Pagination" version 1.2
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-post-type-ajax-pagnaition.php" instead of "cptapagination-init.php")

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
Good job! No executable or dangerous file extensions detected237 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15412176
CSS10142
JavaScript10019

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions3
▷ Named functions3100.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
No PNG files were detected