84% wp-number-of-items-per-page

Code Review | WP Number Of Items Per Page

WordPress plugin WP Number Of Items Per Page scored84%from 54 tests.

About plugin

  • Plugin page: wp-number-of-item...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Nov 10, 2016
  • Latest release: Nov 19, 2016
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: pwron (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,661 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.02ms] Passed 4 tests

This is a short check of server-side resources used by WP Number Of Items Per Page
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.84 ▼3.36
Dashboard /wp-admin3.32 ▼0.0347.44 ▼16.72
Posts /wp-admin/edit.php3.37 ▲0.0148.19 ▲1.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.17 ▼7.45
Media Library /wp-admin/upload.php3.24 ▲0.0133.64 ▼0.54

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Number Of Items Per Page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼0.821.74 ▼0.3038.37 ▼5.76
Dashboard /wp-admin2,203 ▲154.85 ▼0.9497.78 ▼16.1740.54 ▼2.81
Posts /wp-admin/edit.php2,194 ▲1052.06 ▼0.0936.61 ▲1.2237.65 ▲2.66
Add New Post /wp-admin/post-new.php1,533 ▼923.04 ▲4.57640.16 ▲6.6256.90 ▲6.25
Media Library /wp-admin/upload.php1,388 ▲64.25 ▲0.0995.65 ▼3.1440.67 ▼4.13

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 plugin_dir_path() in wp-content/plugins/wp-number-of-items-per-page/wp-number-of-items-per-page.php:14

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: pages, number, elements, admin, backend...

wp-number-of-items-per-page/wp-number-of-items-per-page.php 92% from 13 tests

The principal PHP file in "WP Number Of Items Per Page" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected66 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript110340
PHP2111426

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin