84% featured-image-on-top

Code Review | Featured Image on Top

WordPress plugin Featured Image on Top scored84%from 54 tests.

About plugin

  • Plugin page: featured-image-on...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2012
  • Latest release: Apr 16, 2012
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: emrikol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,994 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.02MB] [CPU: ▼6.79ms] Passed 4 tests

An overview of server-side resources used by Featured Image on Top
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.66 ▼2.09
Dashboard /wp-admin3.33 ▲0.0346.98 ▼5.30
Posts /wp-admin/edit.php3.38 ▲0.0346.07 ▼2.52
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.69 ▼14.27
Media Library /wp-admin/upload.php3.25 ▲0.0333.50 ▼5.06

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
dws_fit
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Featured Image on Top
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.181.90 ▲0.0944.95 ▲2.75
Dashboard /wp-admin2,195 ▲185.62 ▲0.0182.14 ▼5.6037.22 ▼5.75
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0335.19 ▼3.2234.94 ▼0.52
Add New Post /wp-admin/post-new.php1,533 ▲723.34 ▲0.25602.75 ▼93.1463.57 ▼1.29
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0398.22 ▼8.7040.54 ▼6.95

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/featured-image-on-top/fit.php:22
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/featured-image-on-top/fit.php on line 22

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (The post screen showing the metabox up in the top right. Not really that fancy.), #2 (The only option in the plugin. It can force all users to keep the metabox up to, despite how they order their metaboxes.)
You can take inspiration from this readme.txt

featured-image-on-top/fit.php 92% from 13 tests

The entry point to "Featured Image on Top" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("featured-image-on-top.php" instead of "fit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131367

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.07MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png44.96KB44.43KB▼ 1.17%
screenshot-2.png26.73KB26.60KB0.49%