77% simplistic-page-navi

Code Review | Simplistic page navi

WordPress plugin Simplistic page navi scored77%from 54 tests.

About plugin

  • Plugin page: simplistic-page-navi
  • Plugin version: 5.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2016
  • Latest release: Nov 12, 2022
  • Number of updates: 25
  • Update frequency: every 92.8 days
  • Top authors: strix-bubol5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,657 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.13ms] Passed 4 tests

This is a short check of server-side resources used by Simplistic page navi
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.23 ▲0.01
Dashboard /wp-admin3.40 ▲0.1047.90 ▼2.52
Posts /wp-admin/edit.php3.51 ▲0.1647.02 ▼0.16
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.81 ▼5.85
Media Library /wp-admin/upload.php3.32 ▲0.0935.98 ▲3.53
Simplistic Page-navi Option /wp-admin/options-general.php?page=splcpn_plugin_options3.3631.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
splcpn_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Simplistic page navi
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.32 ▼0.201.49 ▼0.2038.69 ▼4.10
Dashboard /wp-admin2,202 ▲215.64 ▲0.0582.04 ▼20.8337.98 ▼6.14
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0133.74 ▼2.4733.57 ▼4.21
Add New Post /wp-admin/post-new.php1,536 ▲1023.22 ▼0.57670.74 ▼26.5652.94 ▲0.38
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0596.14 ▼4.1542.50 ▼3.21
Simplistic Page-navi Option /wp-admin/options-general.php?page=splcpn_plugin_options1,2992.0022.0731.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% 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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/simplistic-page-navi/js_output.php
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: inope in wp-content/plugins/simplistic-page-navi/js_output.php on line 90
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simplistic-page-navi/explain.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simplistic-page-navi/simplistic_pagenavi.php:84
    • > PHP Notice
      Undefined variable: target in wp-content/plugins/simplistic-page-navi/js_output.php on line 82
    • > PHP Notice
      Undefined variable: target in wp-content/plugins/simplistic-page-navi/js_output.php on line 75
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simplistic-page-navi/js_output.php on line 108
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simplistic-page-navi/js_output.php on line 82
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simplistic-page-navi/js_output.php on line 90
    • > PHP Notice
      Undefined variable: inope in wp-content/plugins/simplistic-page-navi/js_output.php on line 108
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simplistic-page-navi/js_output.php on line 75

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: ""
  • Screenshots: Add images for these screenshots: #1 (page list styling samples.), #2 (reverse list and minimum list.), #3 (Option page english.)
The official readme.txt might help

simplistic-page-navi/simplistic_pagenavi.php 85% from 13 tests

The main PHP script in "Simplistic page navi" version 5.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simplistic-page-navi.php" instead of "simplistic_pagenavi.php")
  • 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 review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,617 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP4162108928
PO File178196321
CSS64757259
JavaScript1107994
JSON10015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity95.00
▷ Minimum class complexity95.00
▷ Maximum class complexity95.00
Average method complexity5.95
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1263.16%
▷ Protected methods00.00%
▷ Private methods736.84%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin