84% blogcard-for-wp

Code Review | Blogcard for WP

WordPress plugin Blogcard for WP scored84%from 54 tests.

About plugin

  • Plugin page: blogcard-for-wp
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2023
  • Latest release: Jul 24, 2023
  • Number of updates: 11
  • Update frequency: every 10.6 days
  • Top authors: ejointjp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /295 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.04MB] [CPU: ▼4.57ms] Passed 4 tests

A check of server-side resources used by Blogcard for WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.49 ▼0.67
Dashboard /wp-admin3.34 ▲0.0442.54 ▼6.76
Posts /wp-admin/edit.php3.39 ▲0.0343.38 ▲0.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0479.94 ▼11.38
Media Library /wp-admin/upload.php3.26 ▲0.0336.25 ▲5.24

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blogcard for WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.74 ▲0.361.62 ▼0.1041.91 ▼7.35
Dashboard /wp-admin2,209 ▲215.83 ▲0.92101.88 ▼12.3343.13 ▼2.45
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0334.75 ▼1.4831.13 ▼2.71
Add New Post /wp-admin/post-new.php1,532 ▼123.38 ▲0.23642.82 ▼18.9249.28 ▼6.09
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0296.59 ▲1.2041.35 ▼1.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 plugin_dir_path() in wp-content/plugins/blogcard-for-wp/blogcard-for-wp.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: url, link, blogcard, card, blog

blogcard-for-wp/blogcard-for-wp.php Passed 13 tests

This is the main PHP file of "Blogcard for WP" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
99 characters long description:
URLを貼るだけで、ブログカード風のリンクが作れるGutenbergブロックです。

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
Success! There were no dangerous files found in this plugin174 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP258103171
CSS2222
JavaScript1021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin