84% kcpt-fading-image-widget

Code Review | KCPT Fading Image Widget

WordPress plugin KCPT Fading Image Widget scored 84% from 54 tests.

About plugin

  • Plugin page: kcpt-fading-image...
  • Plugin version: 0.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Nov 14, 2014
  • Latest release: Jun 21, 2016
  • Number of updates: 25
  • Update frequency: every 23.4 days
  • Top authors: Fastmover (92%)KCPT (12%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,374 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.49ms] Passed 4 tests

Server-side resources used by KCPT Fading Image Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.06 ▼4.64
Dashboard /wp-admin3.34 ▲0.0443.97 ▼6.84
Posts /wp-admin/edit.php3.39 ▲0.0448.92 ▲2.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.31 ▼11.82
Media Library /wp-admin/upload.php3.27 ▲0.0434.67 ▲1.36

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

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

Browser metrics Passed 4 tests

A check of browser resources used by KCPT Fading Image Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲7014.45 ▲0.181.78 ▼0.3837.16 ▼13.62
Dashboard /wp-admin2,206 ▲144.86 ▼0.04110.78 ▼19.4242.33 ▼1.85
Posts /wp-admin/edit.php2,068 ▼242.00 ▼0.0235.59 ▼1.0032.67 ▼0.19
Add New Post /wp-admin/post-new.php1,514 ▼517.69 ▼5.30681.14 ▲18.2253.72 ▼6.70
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0494.78 ▼0.6140.65 ▼0.14

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_kcpt_image_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kcpt-fading-image-widget/kcpt-image-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
3 plugin tags: widget, image, image widget

kcpt-fading-image-widget/kcpt-image-widget.php 92% from 13 tests

Analyzing the main PHP file in "KCPT Fading Image Widget" version 0.0.5
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kcpt-fading-image-widget.php" instead of "kcpt-image-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected224 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP18213150
JavaScript113734
CSS13031
Markdown1409

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.23
Average class complexity10.50
▷ Minimum class complexity3.00
▷ Maximum class complexity18.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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
No PNG images were found in this plugin