83% persian-nested-showhide-text

Code Review | Persian Nested Show/Hide Text

WordPress plugin Persian Nested Show/Hide Text scored83%from 54 tests.

About plugin

  • Plugin page: persian-nested-sh...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 9, 2017
  • Latest release: May 10, 2020
  • Number of updates: 15
  • Update frequency: every 73.2 days
  • Top authors: aboutorab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,534 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
This plugin's installer ran successfully

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

A check of server-side resources used by Persian Nested Show/Hide Text
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.70 ▼5.32
Dashboard /wp-admin3.31 ▲0.0147.17 ▼3.10
Posts /wp-admin/edit.php3.36 ▲0.0048.56 ▲3.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.90 ▼14.29
Media Library /wp-admin/upload.php3.23 ▲0.0033.03 ▼2.33

Server storage [IO: ▲0.09MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Persian Nested Show/Hide Text: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.37 ▼0.921.74 ▼0.1140.78 ▼9.12
Dashboard /wp-admin2,206 ▲184.88 ▼1.17107.53 ▲1.4341.68 ▼6.79
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0540.27 ▼2.8734.41 ▼1.38
Add New Post /wp-admin/post-new.php1,533 ▼523.41 ▲5.34596.54 ▼47.8047.40 ▼10.02
Media Library /wp-admin/upload.php1,391 ▲64.41 ▲0.2095.70 ▼6.4344.53 ▼0.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/persian-nested-showhide-text/pesian-nested-showhide-text.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (This screen shot show the usage of shortcode in the post.), #2 (This screen shot show output of shortcode.)
Please take inspiration from this readme.txt

persian-nested-showhide-text/pesian-nested-showhide-text.php 85% from 13 tests

The principal PHP file in "Persian Nested Show/Hide Text" v. 1.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("persian-nested-showhide-text.php" instead of "pesian-nested-showhide-text.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin256 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23960227
PO File16629

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png26.84KB10.34KB▼ 61.47%
screenshot-1.png37.75KB17.34KB▼ 54.06%