94% tiles-badge-block

Code Review | Tiles Badge Block

WordPress plugin Tiles Badge Block scored 94% from 54 tests.

About plugin

  • Plugin page: tiles-badge-block
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.8
  • WordPress version: 5.9.2
  • First release: Jul 15, 2021
  • Latest release: Jul 15, 2021
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: usetiles (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 210 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Tiles Badge Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0254.67 ▲7.10
Dashboard /wp-admin3.43 ▲0.0334.18 ▲0.34
Posts /wp-admin/edit.php3.66 ▲0.0237.96 ▼1.80
Add New Post /wp-admin/post-new.php6.93 ▼0.0697.59 ▼1,158.99
Media Library /wp-admin/upload.php3.31 ▲0.01147.83 ▲120.59

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tiles Badge Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1916.18 ▲0.166.38 ▼0.102.50 ▲0.00
Dashboard /wp-admin2,895 ▲416.14 ▼0.07118.13 ▼13.31154.97 ▼7.10
Posts /wp-admin/edit.php2,694 ▲63.25 ▲0.0171.44 ▲7.26141.15 ▼3.79
Add New Post /wp-admin/post-new.php1,794 ▲13316.92 ▲0.48448.82 ▲6.74164.28 ▲6.40
Media Library /wp-admin/upload.php1,695 ▼35.54 ▲0.01163.32 ▲27.65201.89 ▲6.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiles-badge-block/tiles-badge-block.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: blocks, tiles, block, badge, gutenberg

tiles-badge-block/tiles-badge-block.php Passed 13 tests

The main file in "Tiles Badge Block" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Add a badge to highlight content areas on your website.

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
Success! There were no dangerous files found in this plugin62 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON10052
PHP21226
CSS2002
JavaScript1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin