84% endless-posts-navigation

Code Review | Endless Posts Navigation

WordPress plugin Endless Posts Navigation scored84%from 54 tests.

About plugin

  • Plugin page: endless-posts-nav...
  • Plugin version: 2.2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 10, 2013
  • Latest release: May 24, 2023
  • Number of updates: 50
  • Update frequency: every 69.0 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /8,312 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.69ms] Passed 4 tests

Server-side resources used by Endless Posts Navigation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1649.45 ▲3.88
Dashboard /wp-admin3.33 ▲0.0351.21 ▼9.23
Posts /wp-admin/edit.php3.38 ▲0.0251.61 ▼2.26
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.61 ▼12.17
Media Library /wp-admin/upload.php3.25 ▲0.0237.09 ▲0.90
Endless Posts Navigation /wp-admin/options-general.php?page=endless_posts_navigation3.2736.11

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Endless Posts Navigation
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲9913.46 ▼0.838.57 ▲6.4041.65 ▼6.97
Dashboard /wp-admin2,206 ▲325.53 ▼0.0885.26 ▼1.0741.37 ▼0.52
Posts /wp-admin/edit.php2,111 ▲82.02 ▲0.0336.58 ▼4.3532.62 ▼6.73
Add New Post /wp-admin/post-new.php1,536 ▲823.48 ▲0.24597.47 ▼53.7750.87 ▼7.88
Media Library /wp-admin/upload.php1,411 ▲114.18 ▼0.0097.00 ▼9.2743.91 ▼4.00
Endless Posts Navigation /wp-admin/options-general.php?page=endless_posts_navigation1,0031.7027.7341.38

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 did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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
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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/endless-posts-navigation/io/functions-inner.php:400

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: alphabetic, posts sorting, alphabetic navigation, alphabetic posts sorting, posts navigation...

endless-posts-navigation/index.php 92% from 13 tests

The main PHP file in "Endless Posts Navigation" ver. 2.2.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("endless-posts-navigation.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin3,044 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP51,7475252,630
CSS31875244
PO File34242163
JavaScript1307

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity23.53
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods145
▷ Static methods6242.76%
▷ Public methods14297.93%
▷ Protected methods00.00%
▷ Private methods32.07%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants32
▷ Global constants32100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
io/sample.png9.60KB0.75KB▼ 92.18%