77% promote-my-extensions

Code Review | Promote My Extensions

WordPress plugin Promote My Extensions scored 77% from 54 tests.

About plugin

  • Plugin page: promote-my-extens...
  • Plugin version: 0.4.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2022
  • Latest release: Dec 11, 2022
  • Number of updates: 15
  • Update frequency: every 0.2 days
  • Top authors: grandslambert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 495 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼15.13ms] Passed 4 tests

A check of server-side resources used by Promote My Extensions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.31 ▼7.79
Dashboard /wp-admin3.45 ▲0.1545.17 ▼4.16
Posts /wp-admin/edit.php3.50 ▲0.1446.37 ▼0.95
Add New Post /wp-admin/post-new.php6.05 ▲0.1685.01 ▼47.62
Media Library /wp-admin/upload.php3.37 ▲0.1438.41 ▲4.84
Add New My Extension /wp-admin/post-new.php?post_type=gs_pmp_extension3.5454.95
Documentation /wp-admin/edit.php?post_type=gs_pmp_documentation3.4136.61
My Extensions /wp-admin/edit.php?post_type=gs_pmp_extension3.4136.12
New Documentation /wp-admin/post-new.php?post_type=gs_pmp_documentation3.5353.39
Plugin Categories /wp-admin/edit-tags.php?taxonomy=gs_pmp_category&post_type=gs_pmp_extension3.3634.25
Documentation Categories /wp-admin/edit-tags.php?taxonomy=gs_pmp_documentation_cat&post_type=gs_pmp_documentation3.3641.54
Settings /wp-admin/edit.php?post_type=gs_pmp_extension&page=promote_my_extensions3.3831.39

Server storage [IO: ▲0.04MB] [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: 11 new files
Database: no new tables, 24 new options
New WordPress options
gs_pmp_index_slug
widget_recent-comments
can_compress_scripts
gs_pmp_singular_label
gs_pmp_use_reviews
gs_pmp_display_order
theysaidso_admin_options
gs_pmp_use_faq
widget_theysaidso_widget
gs_pmp_use_trackbacks
...

Browser metrics Passed 4 tests

Promote My Extensions: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.26 ▼1.111.84 ▲0.1941.33 ▲2.50
Dashboard /wp-admin2,260 ▲805.79 ▲0.8899.65 ▼51.4238.69 ▼4.80
Posts /wp-admin/edit.php2,140 ▲512.05 ▲0.0535.10 ▼2.1231.32 ▼3.81
Add New Post /wp-admin/post-new.php1,573 ▲3923.27 ▲0.12653.68 ▼31.3253.49 ▼17.12
Media Library /wp-admin/upload.php1,436 ▲484.24 ▲0.0393.01 ▼71.7541.85 ▼14.87
Add New My Extension /wp-admin/post-new.php?post_type=gs_pmp_extension2,9407.95189.6077.37
Documentation /wp-admin/edit.php?post_type=gs_pmp_documentation1,1661.9428.9431.12
My Extensions /wp-admin/edit.php?post_type=gs_pmp_extension1,1631.9429.8231.32
New Documentation /wp-admin/post-new.php?post_type=gs_pmp_documentation2,8287.71168.8458.90
Plugin Categories /wp-admin/edit-tags.php?taxonomy=gs_pmp_category&post_type=gs_pmp_extension1,3192.1429.0627.69
Documentation Categories /wp-admin/edit-tags.php?taxonomy=gs_pmp_documentation_cat&post_type=gs_pmp_documentation1,3182.1426.6429.60
Settings /wp-admin/edit.php?post_type=gs_pmp_extension&page=promote_my_extensions1,1282.0322.7830.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 24 options
    • gs_pmp_use_faq
    • gs_pmp_use_donate
    • gs_pmp_use_trackbacks
    • gs_pmp_use_excerpt
    • gs_pmp_use_comments
    • gs_pmp_use_revisions
    • can_compress_scripts
    • db_upgraded
    • gs_pmp_plural_label
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/promote-my-extensions/includes/plugin-details-display.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/promote-my-extensions/includes/plugin-details-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/promote-my-extensions/admin/init.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/promote-my-extensions/admin/plugin-post-type-documentation.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/promote-my-extensions/includes/admin-footer.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/promote-my-extensions/admin/init.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/promote-my-extensions/admin/plugin-post-type.php:39

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=gs_pmp_extension&page=promote_my_extensions
    • > Network (severe)
    wp-content/plugins/promote-my-extensions/js/admin.js?ver=1670705964 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: developer, plugins

promote-my-extensions/promote-my-plugins.php 69% from 13 tests

The main PHP script in "Promote My Extensions" version 0.4.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("promote-my-extensions.php" instead of "promote-my-plugins.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "5.2")
  • 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
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin681 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9123109676
CSS1005

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin