68% pud-generator

Code Review | PUD Generator

WordPress plugin PUD Generator scored68%from 54 tests.

About plugin

  • Plugin page: pud-generator
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Sep 21, 2018
  • Latest release: Sep 21, 2018
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: pudsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /860 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼1.52ms] Passed 4 tests

Server-side resources used by PUD Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2143.92 ▲7.10
Dashboard /wp-admin3.51 ▲0.1754.92 ▼7.90
Posts /wp-admin/edit.php3.63 ▲0.2743.06 ▼2.33
Add New Post /wp-admin/post-new.php6.09 ▲0.2090.76 ▲1.12
Media Library /wp-admin/upload.php3.43 ▲0.2136.01 ▲3.02
New Generator /wp-admin/admin.php?page=pud_generator3.5342.72
General /wp-admin/admin.php?page=pud_general3.4231.54
Placeholders /wp-admin/admin.php?page=pud_placeholder3.4243.03
All Generator /wp-admin/admin.php?page=pud_manage3.4232.21

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 49 new files
Database: 4 new tables, 13 new options
New tables
wp_pud_generator_placeholders
wp_pud_generator_logs
wp_pud_placeholders
wp_pud_generator
New WordPress options
pud_page_visibility
pud_tour_generator
pud_max_page
db_upgraded
pud_default_author
can_compress_scripts
pud_tour_manage
pud_page_status
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for PUD Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲16113.43 ▼1.347.49 ▲5.9038.11 ▼1.80
Dashboard /wp-admin2,224 ▲445.55 ▼0.1283.91 ▼1.5039.40 ▼2.58
Posts /wp-admin/edit.php2,139 ▲391.99 ▲0.0235.55 ▼0.2433.21 ▼1.07
Add New Post /wp-admin/post-new.php1,566 ▲4018.24 ▼5.54649.33 ▼18.7463.84 ▲12.34
Media Library /wp-admin/upload.php1,435 ▲384.22 ▲0.01107.61 ▲7.9947.85 ▲5.81
New Generator /wp-admin/admin.php?page=pud_generator2,2665.81111.1764.19
General /wp-admin/admin.php?page=pud_general3,42231.981,024.5029.73
Placeholders /wp-admin/admin.php?page=pud_placeholder1,4702.9475.6340.85
All Generator /wp-admin/admin.php?page=pud_manage1,4352.9459.8035.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_pud_placeholders
    • wp_pud_generator_logs
    • wp_pud_generator
    • wp_pud_generator_placeholders
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pud-generator/public/partials/pud-generator-public-display.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function page_tabs() in wp-content/plugins/pud-generator/admin/partials/pud-generator-admin-general.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function page_tabs() in wp-content/plugins/pud-generator/admin/partials/pud-generator-admin-generator.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function page_tabs() in wp-content/plugins/pud-generator/admin/partials/pud-generator-admin-manage.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function page_tabs() in wp-content/plugins/pud-generator/admin/partials/pud-generator-admin-placeholder.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

pud-generator/pud-generator.php 92% from 13 tests

This is the main PHP file of "PUD Generator" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin6,424 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP152124722,059
JavaScript81014361,107
CSS79128587

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity14.86
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods4189.13%
▷ Protected methods00.00%
▷ Private methods510.87%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
8 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/DataTables-1.10.18/images/sort_asc.png0.15KB0.25KB0.00%
admin/css/DataTables-1.10.18/images/sort_desc.png0.15KB0.25KB0.00%
admin/css/DataTables-1.10.18/images/sort_both.png0.20KB0.29KB0.00%
admin/css/DataTables-1.10.18/images/sort_asc_disabled.png0.14KB0.25KB0.00%
admin/css/modal-bg.png2.73KB0.09KB▼ 96.54%