84% custom-read-more-image-effect-block

Code Review | Custom block fancy image link

WordPress plugin Custom block fancy image link scored84%from 54 tests.

About plugin

  • Plugin page: custom-read-more-...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Apr 9, 2021
  • Latest release: Jun 21, 2021
  • Number of updates: 5
  • Update frequency: every 14.8 days
  • Top authors: mojmik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /365 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
Install script ran successfully

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

Server-side resources used by Custom block fancy image link
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.25 ▼2.78
Dashboard /wp-admin3.31 ▼0.0442.88 ▼17.04
Posts /wp-admin/edit.php3.36 ▲0.0046.96 ▲0.49
Add New Post /wp-admin/post-new.php5.88 ▼0.0089.03 ▼10.88
Media Library /wp-admin/upload.php3.23 ▲0.0034.03 ▼0.70

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Custom block fancy image link: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.32 ▼1.294.09 ▲2.2043.30 ▲0.57
Dashboard /wp-admin2,203 ▲185.82 ▼0.0698.12 ▼24.9938.98 ▼4.72
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.1639.19 ▲4.5634.69 ▼0.29
Add New Post /wp-admin/post-new.php6,352 ▲4,81927.69 ▲4.48818.59 ▲171.0769.11 ▲16.13
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0294.47 ▼5.1166.10 ▲23.07

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-read-more-image-effect-block/wpcustomblock.php:13

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 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid url: "none"
The official readme.txt might help

custom-read-more-image-effect-block/wpcustomblock.php 92% from 13 tests

The primary PHP file in "Custom block fancy image link" version 1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-read-more-image-effect-block.php" instead of "wpcustomblock.php")

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
Everything looks great! No dangerous files found in this plugin174 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1135107
CSS20046
PHP16921

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected