89% simple-reuseblock-widget

Code Review | simple reuseblock widget

WordPress plugin simple reuseblock widget scored89%from 54 tests.

About plugin

  • Plugin page: simple-reuseblock...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2021
  • Latest release: Jul 13, 2021
  • Number of updates: 6
  • Update frequency: every 15.0 days
  • Top authors: yukimichi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /430 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by simple reuseblock widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.17 ▼1.93
Dashboard /wp-admin3.32 ▲0.0150.50 ▼1.63
Posts /wp-admin/edit.php3.37 ▲0.0159.85 ▲3.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.06 ▼26.96
Media Library /wp-admin/upload.php3.24 ▲0.0137.84 ▲2.03

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_srbw_reblock_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for simple reuseblock widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.28 ▼0.291.64 ▼0.0737.45 ▼5.69
Dashboard /wp-admin2,204 ▲335.52 ▼0.1591.72 ▼4.2344.01 ▼2.06
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0239.56 ▲5.1345.96 ▲10.13
Add New Post /wp-admin/post-new.php1,545 ▲1718.27 ▼4.92611.88 ▼8.3165.61 ▲12.07
Media Library /wp-admin/upload.php1,415 ▲184.21 ▼0.0399.27 ▼5.3552.38 ▲5.56

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

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 93% 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
Please fix the following attributes: Please take inspiration from this readme.txt

simple-reuseblock-widget/simple-reuseblock-widget.php 92% from 13 tests

The main file in "simple reuseblock widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 381 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin341 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP51864341

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin