84% shortcode-getall-widget

Code Review | Widget Shortcode

WordPress plugin Widget Shortcode scored 84% from 54 tests.

About plugin

  • Plugin page: shortcode-getall-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Jan 3, 2017
  • Number of updates: 3
  • Update frequency: every 58.3 days
  • Top authors: bhupesh_1992 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 761 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.69ms] Passed 4 tests

This is a short check of server-side resources used by Widget Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.34 ▼1.45
Dashboard /wp-admin3.35 ▲0.0452.21 ▲1.82
Posts /wp-admin/edit.php3.40 ▲0.0448.46 ▼5.33
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.95 ▼0.76
Media Library /wp-admin/upload.php3.27 ▲0.0435.15 ▲0.78

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Widget Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.35 ▼1.051.77 ▼0.2242.82 ▼3.21
Dashboard /wp-admin2,206 ▲184.85 ▼1.21106.56 ▲9.2439.54 ▼4.29
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0038.64 ▼3.4636.26 ▼2.53
Add New Post /wp-admin/post-new.php1,537 ▲423.39 ▲0.16650.23 ▼18.3756.31 ▲6.98
Media Library /wp-admin/upload.php1,388 ▲34.29 ▲0.0993.45 ▼14.4240.78 ▼6.69

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/shortcode-getall-widget/loadinit.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
4 plugin tags: widget, theme, shortcode, admin

shortcode-getall-widget/loadinit.php 85% from 13 tests

The principal PHP file in "Widget Shortcode" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shortcode-getall-widget.php" instead of "loadinit.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin96 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1332672
JavaScript14424

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/cogwheel.png0.58KB0.51KB▼ 12.12%