84% ask-expert

Code Review | Ask The Expert Block

WordPress plugin Ask The Expert Block scored84%from 54 tests.

About plugin

  • Plugin page: ask-expert
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 6.3.1
  • First release: Apr 16, 2021
  • Latest release: Apr 18, 2021
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: wpvitamins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /342 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: ▲0.02MB] [CPU: ▼2.89ms] Passed 4 tests

This is a short check of server-side resources used by Ask The Expert Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.89 ▼12.82
Dashboard /wp-admin3.33 ▲0.0252.22 ▲1.04
Posts /wp-admin/edit.php3.38 ▲0.0248.48 ▲2.15
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.39 ▼1.87
Media Library /wp-admin/upload.php3.25 ▲0.0235.74 ▲2.09

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ask The Expert Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.81 ▼0.595.48 ▲3.5637.86 ▼8.09
Dashboard /wp-admin2,231 ▲435.22 ▲0.33103.40 ▲2.0936.07 ▼3.13
Posts /wp-admin/edit.php2,095 ▲32.35 ▲0.3235.37 ▼3.2331.98 ▼3.81
Add New Post /wp-admin/post-new.php6,266 ▲4,73319.47 ▼3.96899.10 ▲235.2239.74 ▼26.71
Media Library /wp-admin/upload.php1,417 ▲294.34 ▲0.1591.34 ▼16.1041.43 ▼1.51
Ask The Expert /wp-admin/ask-expert-block.php260.440.0913.66

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/ask-expert-block.php
    • > Network (severe)
    wp-admin/ask-expert-block.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
No plugin tags provided

ask-expert/ask-expert-block.php 85% from 13 tests

The main PHP script in "Ask The Expert Block" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ask-expert.php" instead of "ask-expert-block.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected681 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3337342
PHP18350281
CSS213058

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin