68% multiple-pages-generator-by-porthas

Code Review | Multiple Page Generator Plugin - MPG

WordPress plugin Multiple Page Generator Plugin - MPG scored68%from 54 tests.

About plugin

  • Plugin page: multiple-pages-ge...
  • Plugin version: 3.3.23
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2018
  • Latest release: Aug 18, 2023
  • Number of updates: 117
  • Update frequency: every 14.9 days
  • Top authors: p0rthas (65.81%)themeisle (35.04%)

Code review

54 tests

User reviews

20 reviews

Install metrics

3,000+ active /60,479 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲2.30MB] [CPU: ▲9.53ms] 75% from 4 tests

Analyzing server-side resources used by Multiple Page Generator Plugin - MPG
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 4,328.64ms on /wp-admin/admin.php?page=ti-about-multiple_pages_generator_by_porthas)
PageMemory (MB)CPU Time (ms)
Home /5.75 ▲2.2855.33 ▲15.22
Dashboard /wp-admin5.67 ▲2.3759.78 ▲9.36
Posts /wp-admin/edit.php5.71 ▲2.3557.56 ▲14.39
Add New Post /wp-admin/post-new.php8.18 ▲2.3098.04 ▼0.87
Media Library /wp-admin/upload.php5.52 ▲2.2962.00 ▲25.90
Create New + /wp-admin/admin.php?page=mpg-dataset-library5.501,213.52
About Us /wp-admin/admin.php?page=ti-about-multiple_pages_generator_by_porthas6.594,328.64
Search settings /wp-admin/admin.php?page=mpg-search-settings5.5048.00
All Projects /wp-admin/admin.php?page=mpg-project-builder5.4947.89
Advanced settings /wp-admin/admin.php?page=mpg-advanced-settings5.5147.88

Server storage [IO: ▲4.11MB] [DB: ▲0.89MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/multiple-pages-generator-by-porthas/" and "wp-content/uploads/"
    • (new file) wp-content/mpg-cache/.empty
    • (new file) wp-content/mpg-uploads/.empty
Filesystem: 314 new files
Database: 4 new tables, 7 new options
New tables
wp_mpg_logs
wp_mpg_projects
wp_mpg_spintax
wp_mpg_cache
New WordPress options
theysaidso_admin_options
db_upgraded
multiple_pages_generator_by_porthas_install
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Multiple Page Generator Plugin - MPG
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,007 ▲24614.22 ▼0.162.00 ▲0.3029.25 ▼13.56
Dashboard /wp-admin2,391 ▲2145.58 ▼0.0282.79 ▼22.8183.26 ▲38.80
Posts /wp-admin/edit.php2,168 ▲681.98 ▼0.0333.29 ▼3.3034.54 ▲4.72
Add New Post /wp-admin/post-new.php1,582 ▲2923.80 ▲5.61644.54 ▲9.5046.84 ▼25.50
Media Library /wp-admin/upload.php1,462 ▲594.11 ▼0.06104.17 ▲12.3977.11 ▲36.95
Create New + /wp-admin/admin.php?page=mpg-dataset-library1,82010.19266.74249.60
About Us /wp-admin/admin.php?page=ti-about-multiple_pages_generator_by_porthas1,1606.49136.9888.51
Search settings /wp-admin/admin.php?page=mpg-search-settings1,3924.4256.1888.75
All Projects /wp-admin/admin.php?page=mpg-project-builder1,0532.0525.6024.69
Advanced settings /wp-admin/admin.php?page=mpg-advanced-settings1,5224.6262.0781.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_mpg_projects
    • wp_mpg_cache
    • wp_mpg_logs
    • wp_mpg_spintax
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • multiple_pages_generator_by_porthas_install
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% 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/admin.php?page=mpg-dataset-library
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+558
    mkdir(): File exists

SRP 50% 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
The following issues need your attention
  • 96× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Writer\\WriterInterface' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Writer/WriterAbstract.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Writer\\Common\\Manager\\Style\\StyleManagerInterface' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Writer/Common/Manager/Style/StyleManager.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Writer\\Common\\Manager\\Style\\StyleRegistry' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Writer/ODS/Manager/Style/StyleRegistry.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Reader\\SheetInterface' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Reader/CSV/Sheet.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Reader\\SheetInterface' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Reader/ODS/Sheet.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Writer\\Exception\\WriterException' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Writer/Exception/Border/InvalidStyleException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Writer\\Common\\Manager\\WorksheetManagerInterface' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Writer/ODS/Manager/WorksheetManager.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Exception\\SpoutException' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Common/Exception/EncodingConversionException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Common\\Helper\\Escaper\\EscaperInterface' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Common/Helper/Escaper/ODS.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Manager\\OptionsManagerAbstract' not found in wp-content/plugins/multiple-pages-generator-by-porthas/lib/src/Spout/Writer/ODS/Manager/OptionsManager.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 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
10 plugin tags: csv, keyword, landing page, bulk edit, template...

multiple-pages-generator-by-porthas/porthas-multi-pages-generator.php 92% from 13 tests

The principal PHP file in "Multiple Page Generator Plugin - MPG" v. 3.3.23 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("multiple-pages-generator-by-porthas.php" instead of "porthas-multi-pages-generator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected34,297 lines of code in 278 files:
LanguageFilesBlank linesComment linesLines of code
PHP2185,0228,54419,433
PO File112,6353,1187,967
JavaScript321,2625624,218
CSS9192331,631
Sass11720954
JSON10045
SVG50035
XML10014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.14
▷ Minimum class complexity1.00
▷ Maximum class complexity149.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces54
Interfaces14
Traits1
Classes173
▷ Abstract classes148.09%
▷ Concrete classes15991.91%
▷ Final classes10.63%
Methods1,234
▷ Static methods23819.29%
▷ Public methods91173.82%
▷ Protected methods18214.75%
▷ Private methods14111.43%
Functions104
▷ Named functions1211.54%
▷ Anonymous functions9288.46%
Constants254
▷ Global constants145.51%
▷ Class constants24094.49%
▷ Public constants240100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 compressed PNG files occupy 0.30MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/codeinwp/themeisle-sdk/assets/images/otter/otter-library.png173.18KB173.42KB0.00%
frontend/libs/images/sort_both.png0.20KB0.29KB0.00%
vendor/codeinwp/themeisle-sdk/assets/images/wplk.png1.92KB1.27KB▼ 33.69%
frontend/libs/images/sort_desc.png0.15KB0.25KB0.00%
frontend/libs/images/sort_asc.png0.16KB0.25KB0.00%