63% page-generator

Code Review | Page Generator

WordPress plugin Page Generator scored63%from 54 tests.

About plugin

  • Plugin page: page-generator
  • Plugin version: 1.7.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2014
  • Latest release: Oct 26, 2023
  • Number of updates: 91
  • Update frequency: every 39.2 days
  • Top authors: wpzinc (54.95%)n7studios (46.15%)

Code review

54 tests

User reviews

61 reviews

Install metrics

3,000+ active /85,710 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.85ms] Passed 4 tests

A check of server-side resources used by Page Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.76 ▲2.55
Dashboard /wp-admin3.42 ▲0.1248.05 ▼2.09
Posts /wp-admin/edit.php3.55 ▲0.1945.50 ▼0.09
Add New Post /wp-admin/post-new.php6.10 ▲0.2282.32 ▼7.75
Media Library /wp-admin/upload.php3.34 ▲0.1138.25 ▲5.57
Upgrade /wp-admin/admin.php?page=page-generator-upgrade2.057.06
Page Generator /wp-admin/edit.php?post_type=page-generator-pro2.9022.14
Generate /wp-admin/admin.php?page=page-generator-generate3.3033.24
Keywords /wp-admin/admin.php?page=page-generator-keywords3.3637.92

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 405 new files
Database: 1 new table, 7 new options
New tables
wp_page_generator_keywords
New WordPress options
theysaidso_admin_options
page-generator-version
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Page Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.22 ▼0.141.87 ▲0.0049.68 ▲3.91
Dashboard /wp-admin2,239 ▲625.58 ▼0.0283.05 ▼13.8334.55 ▼7.33
Posts /wp-admin/edit.php2,168 ▲682.02 ▲0.0233.32 ▼1.0436.31 ▲2.16
Add New Post /wp-admin/post-new.php1,591 ▲6523.66 ▲0.70659.87 ▼21.6054.67 ▼2.52
Media Library /wp-admin/upload.php1,438 ▲444.28 ▼0.01108.77 ▲10.8146.65 ▲4.86
Upgrade /wp-admin/admin.php?page=page-generator-upgrade4,44826.02876.27159.58
Page Generator /wp-admin/edit.php?post_type=page-generator-pro11,65926.511,136.0560.49
Generate /wp-admin/admin.php?page=page-generator-generate8521.8622.6824.42
Keywords /wp-admin/admin.php?page=page-generator-keywords1,0752.0424.3839.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_page_generator_keywords
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • page-generator-version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=page-generator-generate
    • > Warning in wp-content/plugins/page-generator/includes/admin/admin.php+754
    include_once(wp-content/plugins/page-generator/views/admin/notices.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=page-generator-generate
    • > Warning in wp-content/plugins/page-generator/includes/admin/admin.php+754
    include_once(): Failed opening 'wp-content/plugins/page-generator/views/admin/notices.php' for inclusion (include_path='.:/usr/share/php')

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 31× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/page-generator/includes/admin/keywords-table.php:16
    • > PHP Notice
      Undefined variable: bottom in wp-content/plugins/page-generator/views/admin/generate-meta-box-actions.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/page-generator/views/admin/keywords-table.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/page-generator/views/admin/generate-meta-box-publish-upgrade.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/page-generator/views/admin/generate-meta-box-permalink.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/page-generator/_modules/dashboard/views/deactivation-modal.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/page-generator/_modules/dashboard/views/notification.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/page-generator/views/admin/keywords-form.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/page-generator/_modules/dashboard/views/modal.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/page-generator/views/admin/generate-meta-box-template.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=page-generator-upgrade
    • > Other (warning) in unknown
    https://www.wpzinc.com/plugins/page-generator-pro/?utm_source=page-generator&utm_medium=link&utm_content=menu&utm_campaign=general 153 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: multiple page generator, landing pages, mass page generator

page-generator/page-generator.php Passed 13 tests

The main PHP script in "Page Generator" version 1.7.2 is automatically included on every request by WordPress
46 characters long description:
Generate multiple Pages using dynamic content.

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
There were no executable files found in this plugin15,131 lines of code in 401 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript501,5542,1576,414
PHP491,8044,4815,464
Sass523602,136
SVG29300614
PO File1247314500
CSS3003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity38.11
▷ Minimum class complexity3.00
▷ Maximum class complexity109.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods238
▷ Static methods20.84%
▷ Public methods19883.19%
▷ Protected methods00.00%
▷ Private methods4016.81%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/logo.png0.33KB0.33KB0.00%