84% dummy-text-shortcode

Code Review | Dummy Text Shortcode

WordPress plugin Dummy Text Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: dummy-text-shortcode
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.3.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2011
  • Latest release: Jan 20, 2012
  • Number of updates: 10
  • Update frequency: every 37.4 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.12ms] Passed 4 tests

Server-side resources used by Dummy Text Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.25 ▲0.08
Dashboard /wp-admin3.31 ▲0.0147.02 ▼1.16
Posts /wp-admin/edit.php3.37 ▲0.0141.77 ▼1.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.07 ▼17.51
Media Library /wp-admin/upload.php3.24 ▲0.0133.98 ▲0.96

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Dummy Text Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.28 ▼1.101.93 ▲0.0443.81 ▼0.66
Dashboard /wp-admin2,200 ▲95.91 ▲1.00108.08 ▲5.5339.37 ▼3.27
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0134.07 ▼0.5235.81 ▲1.05
Add New Post /wp-admin/post-new.php1,533 ▲223.26 ▲5.25655.59 ▼0.1771.15 ▲7.82
Media Library /wp-admin/upload.php1,382 ▼34.21 ▼0.0696.45 ▼2.7343.36 ▲1.69

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dummy-text-shortcode/dummy-text-shortcode.php:99

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Text displayed on a post)
The official readme.txt is a good inspiration

dummy-text-shortcode/dummy-text-shortcode.php Passed 13 tests

"Dummy Text Shortcode" version 1.01's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
102 characters long description:
Adds dummy text via a shortcode. Just place the shortcode [dummy] in any post or page in the HTML tab.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1142165

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.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
1 PNG file occupies 0.21MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png218.80KB68.52KB▼ 68.68%