89% code-generator

Code Review | Code Generate

WordPress plugin Code Generate scored89%from 54 tests.

About plugin

  • Plugin page: code-generator
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: May 2, 2021
  • Latest release: Jul 14, 2022
  • Number of updates: 3
  • Update frequency: every 146.7 days
  • Top authors: ioannup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,801 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.09MB] [CPU: ▼2.04ms] Passed 4 tests

Analyzing server-side resources used by Code Generate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.52 ▲1.0646.08 ▲4.84
Dashboard /wp-admin4.40 ▲1.0952.01 ▼7.14
Posts /wp-admin/edit.php4.51 ▲1.1554.59 ▲2.78
Add New Post /wp-admin/post-new.php7.00 ▲1.1190.92 ▼8.64
Media Library /wp-admin/upload.php4.32 ▲1.0944.27 ▲5.32
Code Generator /wp-admin/tools.php?page=generate_wp_settings4.3350.53

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
generate_wp_version
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Code Generate
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.53 ▼0.928.12 ▲6.2541.63 ▼4.82
Dashboard /wp-admin2,203 ▲265.67 ▼0.0088.26 ▼13.0340.01 ▼6.22
Posts /wp-admin/edit.php2,108 ▲52.06 ▲0.0533.63 ▼1.7834.19 ▼3.43
Add New Post /wp-admin/post-new.php1,533 ▼1423.52 ▼0.10671.64 ▼51.1253.18 ▼6.66
Media Library /wp-admin/upload.php1,402 ▲24.35 ▲0.1294.81 ▼21.8245.85 ▼2.43
Code Generator /wp-admin/tools.php?page=generate_wp_settings1,4313.4170.0830.70

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Plugin Readme Generator), #2 (Result code), #3 (Hooks Handler Generator), #4 (Post Type Generator), #5 (All Generator Types), #6 (How to find it? Tools -> Code generator)
You can look at the official readme.txt

code-generator/code-generator.php 85% from 13 tests

The main PHP file in "Code Generate" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin48,549 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript7402739,893
PHP92534,2308,634
LESS10021
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.67
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods43
▷ Static methods36.98%
▷ Public methods4093.02%
▷ Protected methods00.00%
▷ Private methods36.98%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
No PNG files were detected