84% wphd-posts-addon

Code Review | Post Addon

WordPress plugin Post Addon scored84%from 54 tests.

About plugin

  • Plugin page: wphd-posts-addon
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2023
  • Latest release: Jan 26, 2023
  • Number of updates: 25
  • Update frequency: every 0.0 days
  • Top authors: elenadom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /111 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▲3.12ms] Passed 4 tests

This is a short check of server-side resources used by Post Addon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4550.24 ▲9.91
Dashboard /wp-admin3.77 ▲0.4751.97 ▲4.59
Posts /wp-admin/edit.php3.82 ▲0.4750.13 ▼0.73
Add New Post /wp-admin/post-new.php6.29 ▲0.4089.25 ▲4.35
Media Library /wp-admin/upload.php3.63 ▲0.4038.56 ▲4.26
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.7034.57

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Post Addon
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲13814.46 ▼0.192.11 ▲0.4142.24 ▼1.37
Dashboard /wp-admin2,254 ▲664.87 ▼0.02113.43 ▲0.0646.44 ▲4.31
Posts /wp-admin/edit.php2,148 ▲592.05 ▲0.0336.40 ▼4.3536.87 ▲0.11
Add New Post /wp-admin/post-new.php1,567 ▲3423.10 ▼0.16653.19 ▼17.5061.41 ▲1.24
Media Library /wp-admin/upload.php1,444 ▲564.25 ▲0.0195.40 ▼7.8247.97 ▲2.01
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9982.0830.0433.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wphd-posts-addon/includes/assets/tgm/class-tgm-plugin-activation.php:2169
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wphd-posts-addon/includes/assets/tgm/class-tgm-plugin-activation.php:2169

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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 your attention:
  • Screenshots: Please add an image for screenshot #2 (Style Tab Options styletab.PNG)
The official readme.txt might help

wphd-posts-addon/wphd-posts-addon.php Passed 13 tests

The main PHP file in "Post Addon" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
23 characters long description:
Custom Elementor addon.

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
Good job! No executable or dangerous file extensions detected3,667 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP66921,8523,357
CSS2311220
JavaScript212190

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity41.11
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods121
▷ Static methods64.96%
▷ Public methods9679.34%
▷ Protected methods2520.66%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin