84% details-show-and-hide

Code Review | Details: Show and Hide

WordPress plugin Details: Show and Hide scored84%from 54 tests.

About plugin

  • Plugin page: details-show-and-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2022
  • Latest release: Nov 5, 2022
  • Number of updates: 6
  • Update frequency: every 4.0 days
  • Top authors: lastsplash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /593 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.68ms] Passed 4 tests

This is a short check of server-side resources used by Details: Show and Hide
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.85 ▼3.90
Dashboard /wp-admin3.32 ▼0.0355.11 ▼13.69
Posts /wp-admin/edit.php3.37 ▲0.0149.67 ▼4.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.46 ▼12.41
Media Library /wp-admin/upload.php3.24 ▲0.0140.10 ▼0.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Details: Show and Hide
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.22 ▲0.011.69 ▼1.6344.55 ▲2.91
Dashboard /wp-admin2,198 ▲215.62 ▼0.0886.78 ▼6.0243.58 ▼1.11
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0135.58 ▼4.7631.26 ▼5.93
Add New Post /wp-admin/post-new.php6,366 ▲4,84027.92 ▲4.71872.81 ▲222.3261.10 ▲6.69
Media Library /wp-admin/upload.php1,400 ▼34.14 ▼0.0799.83 ▼7.5142.98 ▼3.35

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/details-show-and-hide/wp-details-block.php:27

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 Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: details, summary, blocks, block, gutenberg...

details-show-and-hide/wp-details-block.php 85% from 13 tests

"Details: Show and Hide" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("details-show-and-hide.php" instead of "wp-details-block.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin50 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON10041
PHP21216
CSS2002
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin