72% posts-per-page-customizer

Code Review | Posts Per Page Customizer

WordPress plugin Posts Per Page Customizer scored72%from 54 tests.

About plugin

  • Plugin page: posts-per-page-cu...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Sep 3, 2015
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: FRESHFACE (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,218 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.07MB] [CPU: ▼42.07ms] Passed 4 tests

An overview of server-side resources used by Posts Per Page Customizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4616.13 ▼23.87
Dashboard /wp-admin3.94 ▲0.6318.16 ▼32.31
Posts /wp-admin/edit.php3.94 ▲0.5819.04 ▼31.05
Add New Post /wp-admin/post-new.php3.94 ▼1.9516.05 ▼81.06
Media Library /wp-admin/upload.php3.94 ▲0.7119.89 ▼12.02
Custom Loops /wp-admin/themes.php?page=CustomLoop3.9419.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Posts Per Page Customizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.19 ▼1.411.93 ▼0.3138.11 ▼6.66
Dashboard /wp-admin2,209 ▲214.87 ▼1.07101.29 ▼1.9737.26 ▼5.33
Posts /wp-admin/edit.php2,098 ▲92.00 ▼0.0536.26 ▼0.2534.17 ▼0.59
Add New Post /wp-admin/post-new.php1,538 ▼523.45 ▲5.17696.84 ▲58.9368.30 ▲17.69
Media Library /wp-admin/upload.php1,397 ▲124.18 ▲0.07104.14 ▼4.3244.14 ▼0.31
Custom Loops /wp-admin/themes.php?page=CustomLoop14,1426.05313.6835.49

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

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/themes.php?page=CustomLoop
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+66
    fopen(wp-content/uploads/freshframework/less_scss/last_deletion.frs): failed to open stream: No such file or directory
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=CustomLoop
    • > Notice in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/extern/less/lib/Less/Parser.php+1724
    Trying to access array offset on value of type null
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=CustomLoop
    • > Warning in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/query/posts/items/class.ffPostGetter.php+75
    count(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=CustomLoop
    • > Deprecated in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/extern/less/lib/Less/Tree/Mixin/Call.php+110
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/extern/iconfonts/fonts.php
  • 328× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ffFactoryAbstract' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/adminScreens/metaBoxes/factories/class.ffMetaBoxViewFactory.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffOptionsPrinterElementsAndComponentsBasic' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/options/printerComponent/class.ffOptionsPrinterComponentsBasic.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/query/posts/items/class.ffPostCollection.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffModalWindowView' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/adminScreens/modalWindow/conditions/class.ffModalWindowConditionsViewDefault.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/extern/less/lib/Less/Tree/Variable.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ffFactoryAbstract' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/themes/menuOptions/factories/class.ffMenuOptionsNamespaceFactory.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffFactoryAbstract' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/shortcodes/factories/class.ffShortcodeFactory.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/core/class.ffPluginContainerHolder.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ffFactoryAbstract' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/query/posts/class.ffPostLayer_Factory.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/posts-per-page-customizer/fresh-framework/framework/themes/menuOptions/class.ffMenuOptionsManager.php:11

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: posts per page, customize loop, change loop

posts-per-page-customizer/freshplugin.php 92% from 13 tests

The primary PHP file in "Posts Per Page Customizer" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("posts-per-page-customizer.php" instead of "freshplugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin104,848 lines of code in 585 files:
LanguageFilesBlank linesComment linesLines of code
PHP37012,73511,78737,667
JSON20024,734
JavaScript724,8935,49821,011
LESS731,7891,7488,217
CSS383295276,969
SVG24005,950
XML200224
HTML22069
Markdown2407

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 156)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.53
▷ Minimum class complexity1.00
▷ Maximum class complexity446.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity156.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes419
▷ Abstract classes235.49%
▷ Concrete classes39694.51%
▷ Final classes00.00%
Methods4,047
▷ Static methods741.83%
▷ Public methods2,26956.07%
▷ Protected methods1,12227.72%
▷ Private methods65616.21%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants372
▷ Global constants9926.61%
▷ Class constants27373.39%
▷ Public constants273100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
27 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fresh-framework/framework/extern/jquery-ui/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%
fresh-framework/framework/adminScreens/assets/images/checkerboard-library-button@2x.png0.97KB0.10KB▼ 89.84%
fresh-framework/framework/extern/select2/select2x2.png0.83KB0.77KB▼ 6.15%
fresh-framework/framework/adminScreens/assets/images/modal-library-size-slider-control-right.png5.81KB0.10KB▼ 98.20%
fresh-framework/framework/extern/jquery-ui/images/ui-bg_glass_100_f6f6f6_1x400.png0.26KB0.12KB▼ 53.44%