84% featured-image-in-admin-panel

Code Review | Featured Image in Admin Panel

WordPress plugin Featured Image in Admin Panel scored84%from 54 tests.

About plugin

  • Plugin page: featured-image-in...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6
  • WordPress version: 6.3.1
  • First release: Sep 24, 2016
  • Latest release: Sep 24, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: seosbg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,850 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.34ms] Passed 4 tests

This is a short check of server-side resources used by Featured Image in Admin Panel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.00 ▲1.18
Dashboard /wp-admin3.32 ▼0.0251.79 ▼13.70
Posts /wp-admin/edit.php3.38 ▲0.0253.89 ▼4.67
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.21 ▼20.18
Media Library /wp-admin/upload.php3.25 ▲0.0240.31 ▲5.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Featured Image in Admin Panel
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.28 ▲0.161.75 ▼0.2844.68 ▼1.75
Dashboard /wp-admin2,212 ▲415.68 ▲0.0984.41 ▼13.6280.69 ▲37.61
Posts /wp-admin/edit.php2,132 ▲321.98 ▼0.0438.87 ▼1.3536.11 ▼1.30
Add New Post /wp-admin/post-new.php1,694 ▲16621.94 ▼1.00726.84 ▲45.1354.16 ▼7.67
Media Library /wp-admin/upload.php1,420 ▲204.11 ▼0.0995.86 ▼13.7578.50 ▲30.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/featured-image-in-admin-panel/featured-image-in-admin-panel.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Admin Panel view of submitted form data.) image missing
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

featured-image-in-admin-panel/featured-image-in-admin-panel.php Passed 13 tests

The principal PHP file in "Featured Image in Admin Panel" v. 1.0 is loaded by WordPress automatically on each request
52 characters long description:
Add Featured Image in Admin Panel - Posts and Pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected173 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS116079
PHP1231861
PO File17833

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.29MB with 0.15MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png219.09KB57.54KB▼ 73.74%
images/banner-772x250.png66.72KB21.52KB▼ 67.74%
images/logo.png11.25KB4.39KB▼ 60.99%
images/icon.png1.58KB1.43KB▼ 9.69%