62% lpagery

Code Review | Bulk Page Generator - LPagery

WordPress plugin Bulk Page Generator - LPagery scored62%from 54 tests.

About plugin

  • Plugin page: lpagery
  • Plugin version: 1.2.18
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2022
  • Latest release: Nov 29, 2023
  • Number of updates: 61
  • Update frequency: every 7.7 days
  • Top authors: niklaslindemann (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /5,698 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲5.50MB] [CPU: ▲22.39ms] 75% from 4 tests

Analyzing server-side resources used by Bulk Page Generator - LPagery
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.50MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.29 ▲5.8365.12 ▲22.80
Dashboard /wp-admin9.31 ▲6.0178.70 ▲23.80
Posts /wp-admin/edit.php9.31 ▲5.9578.59 ▲26.19
Add New Post /wp-admin/post-new.php10.08 ▲4.19113.59 ▲16.76
Media Library /wp-admin/upload.php9.31 ▲6.0870.01 ▲35.59
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.3166.89

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 243 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
fs_accounts
can_compress_scripts
theysaidso_admin_options
fs_debug_mode
widget_recent-comments
fs_active_plugins
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bulk Page Generator - LPagery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20724.46 ▲10.131.79 ▲0.0632.25 ▼11.89
Dashboard /wp-admin2,323 ▲14313.31 ▲7.63247.80 ▲158.3045.35 ▲4.60
Posts /wp-admin/edit.php2,236 ▲13612.39 ▲10.42126.77 ▲88.5939.12 ▲0.53
Add New Post /wp-admin/post-new.php1,603 ▲7631.06 ▲7.90820.37 ▲119.3437.89 ▼17.69
Media Library /wp-admin/upload.php1,529 ▲12914.90 ▲10.71187.97 ▲79.6344.60 ▼2.29
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,16612.09118.9928.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/lpagery/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • fs_accounts
    • db_upgraded
    • fs_active_plugins
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_debug_mode

Smoke tests 25% 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 everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/lpagery/views/confirm_modal.php
    • > /wp-content/plugins/lpagery/views/update_modal.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/lpagery/views/dashboard.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lpagery/lpagery.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lpagery/controller/PageCreator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lpagery/controller/InputParamProvider.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/lpagery/views/settings.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lpagery/controller/CreatePostDelegate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lpagery_fs() in wp-content/plugins/lpagery/views/sidebar.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/lpagery/includes/Enqueues.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/lpagery/views/history.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lpagery/io/AjaxActions.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=freemius 0:0 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: page generator, bulk page, programmatic seo, bulk post creator, local seo

lpagery/lpagery.php Passed 13 tests

"Bulk Page Generator - LPagery" version 1.2.18's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
Create hundreds or even thousands of landingpages for local businesses, services etc.

Code Analysis 97% from 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
No dangerous file extensions were detected70,548 lines of code in 190 files:
LanguageFilesBlank linesComment linesLines of code
PHP1468,54617,50836,218
JavaScript181,75862731,608
CSS22495602,703
XML13016
SVG3003

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity69.96
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes66
▷ Abstract classes23.03%
▷ Concrete classes6496.97%
▷ Final classes00.00%
Methods1,353
▷ Static methods27520.33%
▷ Public methods92968.66%
▷ Protected methods171.26%
▷ Private methods40730.08%
Functions132
▷ Named functions12796.21%
▷ Anonymous functions53.79%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.37MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/img/screenshot-3.png99.56KB32.23KB▼ 67.63%
assets/img/rocket-pro.png43.22KB42.25KB▼ 2.25%
assets/img/LP_Logo_horizontal_2022_RZ.png27.52KB27.52KB0.00%
freemius/assets/img/lpagery.png29.62KB13.69KB▼ 53.79%