84% dfoxt-thumbnails

Code Review | DFOXT Thumbnails 分类\标签图像扩展插件

WordPress plugin DFOXT Thumbnails 分类\标签图像扩展插件 scored84%from 54 tests.

About plugin

  • Plugin page: dfoxt-thumbnails
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2017
  • Latest release: Feb 12, 2023
  • Number of updates: 4
  • Update frequency: every 537.5 days
  • Top authors: hoythan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by DFOXT Thumbnails 分类\标签图像扩展插件
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.99 ▲1.78
Dashboard /wp-admin3.35 ▲0.0561.54 ▲9.61
Posts /wp-admin/edit.php3.47 ▲0.1155.85 ▲2.49
Add New Post /wp-admin/post-new.php5.94 ▲0.0596.78 ▼7.02
Media Library /wp-admin/upload.php3.26 ▲0.0334.69 ▼3.48

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

DFOXT Thumbnails 分类\标签图像扩展插件: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲16914.41 ▲0.041.91 ▲0.3246.31 ▲4.07
Dashboard /wp-admin2,333 ▲1566.15 ▲0.53104.96 ▲16.4039.18 ▲0.54
Posts /wp-admin/edit.php2,267 ▲1673.40 ▲1.4262.07 ▲27.2634.83 ▼0.98
Add New Post /wp-admin/post-new.php1,539 ▲1123.28 ▲0.06673.52 ▼17.8636.03 ▼14.73
Media Library /wp-admin/upload.php1,404 ▲104.25 ▲0.0783.65 ▼15.8246.69 ▼1.68

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/dfoxt-thumbnails/dfoxt_thumbnails.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: nnnn, dfox, doofox, thumbnails, dfoxt

dfoxt-thumbnails/dfoxt_thumbnails.php 92% from 13 tests

Analyzing the main PHP file in "DFOXT Thumbnails 分类\标签图像扩展插件" version 1.2
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dfoxt-thumbnails.php" instead of "dfoxt_thumbnails.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected430 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2513162
PHP11537162
Sass100105
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin