83% module-pager

Code Review | Module Pager

WordPress plugin Module Pager scored83%from 54 tests.

About plugin

  • Plugin page: module-pager
  • Plugin version: 1.6.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0.1
  • WordPress version: 6.3.1
  • First release: Sep 2, 2022
  • Latest release: Sep 27, 2022
  • Number of updates: 3
  • Update frequency: every 11.7 days
  • Top authors: yamadev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /177 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Module Pager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0943.81 ▼0.94
Dashboard /wp-admin3.40 ▲0.0946.04 ▼9.77
Posts /wp-admin/edit.php3.51 ▲0.1549.58 ▲8.19
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.76 ▼18.39
Media Library /wp-admin/upload.php3.32 ▲0.0936.55 ▲0.29
ページネーション設定 /wp-admin/options-general.php?page=wp-module-pager-menu-slug3.3641.06

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, 11 new options
New WordPress options
wp-module-pager_option_db_range
widget_theysaidso_widget
wp-module-pager_option_db_all
widget_recent-posts
wp-module-pager_option_db_next
theysaidso_admin_options
widget_recent-comments
wp-module-pager_option_db_prev
can_compress_scripts
wp-module-pager_option_db_li
...

Browser metrics Passed 4 tests

An overview of browser requirements for Module Pager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.25 ▼1.011.87 ▲0.0441.88 ▼2.44
Dashboard /wp-admin2,210 ▲194.85 ▼0.20104.68 ▲2.5046.51 ▲6.25
Posts /wp-admin/edit.php2,096 ▲41.99 ▲0.0040.62 ▼0.3640.59 ▲3.76
Add New Post /wp-admin/post-new.php1,536 ▲823.15 ▲4.99602.43 ▼8.4849.07 ▼12.86
Media Library /wp-admin/upload.php1,392 ▲44.16 ▼0.1195.81 ▲1.4943.86 ▲1.45
ページネーション設定 /wp-admin/options-general.php?page=wp-module-pager-menu-slug1,34810.64162.02126.31

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_theysaidso_widget
    • wp-module-pager_option_db_prev
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • wp-module-pager_option_db_next
    • widget_recent-posts
    • wp-module-pager_option_db_range
    • wp-module-pager_option_db_all
    • wp-module-pager_option_db_li
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/module-pager/lib/Mustache/Exception/UnknownTemplateException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Logger' not found in wp-content/plugins/module-pager/lib/Mustache/Logger/AbstractLogger.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Cache_AbstractCache' not found in wp-content/plugins/module-pager/lib/Mustache/Cache/NoopCache.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Loader_FilesystemLoader' not found in wp-content/plugins/module-pager/lib/Mustache/Loader/ProductionFilesystemLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Cache' not found in wp-content/plugins/module-pager/lib/Mustache/Cache/AbstractCache.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/module-pager/lib/Mustache/Loader/FilesystemLoader.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/module-pager/admin/partials/wp-module-pager-admin-display.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/module-pager/lib/Mustache/Loader/StringLoader.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Source' not found in wp-content/plugins/module-pager/lib/Mustache/Source/FilesystemSource.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/module-pager/lib/Mustache/Loader/ArrayLoader.php:27

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can look at the official readme.txt

module-pager/wp-module-pager.php 85% from 13 tests

The main PHP file in "Module Pager" ver. 1.6.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("module-pager.php" instead of "wp-module-pager.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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected49,802 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript36,4544,92646,895
PHP486852,6662,856
CSS35851

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.31
Average class complexity8.12
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces6
Traits0
Classes36
▷ Abstract classes38.33%
▷ Concrete classes3391.67%
▷ Final classes00.00%
Methods212
▷ Static methods83.77%
▷ Public methods15472.64%
▷ Protected methods157.08%
▷ Private methods4320.28%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants65
▷ Global constants11.54%
▷ Class constants6498.46%
▷ Public constants64100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin