84% easy-featured-content

Code Review | Easy Featured Content

WordPress plugin Easy Featured Content scored84%from 54 tests.

About plugin

  • Plugin page: easy-featured-con...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2013
  • Latest release: May 23, 2014
  • Number of updates: 6
  • Update frequency: every 77.7 days
  • Top authors: nickohrn (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /4,462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Easy Featured Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.70 ▼3.16
Dashboard /wp-admin3.32 ▲0.0143.74 ▼5.06
Posts /wp-admin/edit.php3.37 ▲0.0142.96 ▼5.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.49 ▼7.84
Media Library /wp-admin/upload.php3.24 ▲0.0133.35 ▼0.37

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Featured Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.161.76 ▲0.0343.88 ▼3.94
Dashboard /wp-admin2,206 ▲174.87 ▼0.05107.89 ▼11.4939.71 ▼7.18
Posts /wp-admin/edit.php2,098 ▲62.05 ▲0.0634.40 ▼2.2435.13 ▲1.70
Add New Post /wp-admin/post-new.php6,232 ▲4,71826.19 ▲8.74940.78 ▲235.3554.65 ▼11.51
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0498.11 ▼3.8043.90 ▲0.61

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/easy-featured-content/views/backend/meta-boxes/featured-content.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/easy-featured-content/featured-content.php:32

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: admin, featured-content

easy-featured-content/featured-content.php 92% from 13 tests

The main PHP file in "Easy Featured Content" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-featured-content.php" instead of "featured-content.php")

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 detected193 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35717173
JavaScript13020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods15100.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
2 PNG files occupy 0.20MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-1.png114.05KB49.37KB▼ 56.71%
screenshots/screenshot-2.png89.18KB34.84KB▼ 60.94%