74% thumbnail-before-content

Code Review | Thumbnail Before Content

WordPress plugin Thumbnail Before Content scored74%from 54 tests.

About plugin

  • Plugin page: thumbnail-before-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Oct 26, 2021
  • Number of updates: 4
  • Update frequency: every 584.3 days
  • Top authors: adam.ainsworth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,568 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Thumbnail Before Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.44 ▼4.07
Dashboard /wp-admin3.32 ▼0.0352.85 ▼23.55
Posts /wp-admin/edit.php3.37 ▲0.0153.32 ▲2.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.75 ▼8.56
Media Library /wp-admin/upload.php3.24 ▲0.0139.30 ▲2.11

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Thumbnail Before Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.54 ▲0.181.84 ▼0.2144.27 ▲0.99
Dashboard /wp-admin2,195 ▲245.56 ▼0.1186.65 ▼2.9039.07 ▼1.49
Posts /wp-admin/edit.php2,097 ▼32.02 ▼0.0038.48 ▲2.5937.09 ▲6.12
Add New Post /wp-admin/post-new.php1,526 ▼323.32 ▲0.20612.18 ▲12.6750.88 ▼11.17
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.13100.12 ▲1.4445.75 ▲2.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/thumbnail-before-content/thumbnail-before-content.php+50
    Use of undefined constant WP_UNINSTALL_PLUGIN - assumed 'WP_UNINSTALL_PLUGIN' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/thumbnail-before-content/thumbnail-before-content.php

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: post thumbnail, featured image, before content

thumbnail-before-content/thumbnail-before-content.php 92% from 13 tests

This is the main PHP file of "Thumbnail Before Content" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin44 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1132042
Markdown1002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods583.33%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.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 were not PNG files found in your plugin