68% now-featuring

Code Review | Now Featuring Wordpress Widget

WordPress plugin Now Featuring Wordpress Widget scored68%from 54 tests.

About plugin

  • Plugin page: now-featuring
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 4, 2015
  • Latest release: Sep 10, 2015
  • Number of updates: 5
  • Update frequency: every 3.0 days
  • Top authors: road2nowhere (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,041 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.61MB] [CPU: ▼52.29ms] Passed 4 tests

Server-side resources used by Now Featuring Wordpress Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.39 ▼1.0710.45 ▼34.62
Dashboard /wp-admin2.41 ▼0.9413.59 ▼51.38
Posts /wp-admin/edit.php2.41 ▼0.9513.36 ▼37.32
Add New Post /wp-admin/post-new.php2.41 ▼3.4812.83 ▼85.82
Media Library /wp-admin/upload.php2.41 ▼0.8212.72 ▼20.21
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=page2.4111.04
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=page2.4112.81

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

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

Browser metrics Passed 4 tests

Now Featuring Wordpress Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.58 ▼0.702.71 ▲0.9338.93 ▼5.96
Dashboard /wp-admin2,215 ▲244.84 ▼0.97103.41 ▼16.9940.66 ▼2.67
Posts /wp-admin/edit.php2,101 ▲152.03 ▲0.0239.57 ▲0.6536.13 ▲5.42
Add New Post /wp-admin/post-new.php1,547 ▲1418.49 ▼4.85640.92 ▼58.2057.35 ▲6.68
Media Library /wp-admin/upload.php1,400 ▲124.16 ▼0.0297.22 ▼10.4343.37 ▼1.95
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=page1,3192.1325.9029.95
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=page1,4582.1426.7131.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in NowFeaturingWidget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • widget_now_featuring
    • db_upgraded
    • widget_theysaidso_widget
    • nf_option_version
    • widget_recent-posts
    • widget_recent-comments
    • category_children
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=page
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in NowFeaturingWidget is deprecated since version 4.3.0! Use __construct() instead.

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
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/now-featuring/includes/widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/now-featuring/includes/widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/now-featuring/includes/load.php:14

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The widget's admin settings for a 'Single' Now Featuring widget), #2 (The Now Featuring 'Single' widget on the sidebar), #3 (The widget's admin settings for a 'Slider' Now Featuring widget), #4 (The Now Featuring 'Slider' widget on the sidebar), #5 (The widget's admin settings for a 'List' Now Featuring widget), #6 (The Now Featuring 'List' widget on the sidebar)
You can take inspiration from this readme.txt

now-featuring/now_featuring.php 92% from 13 tests

Analyzing the main PHP file in "Now Featuring Wordpress Widget" version 0.8
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("now-featuring.php" instead of "now_featuring.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,035 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21571431,086
PHP5111113698
CSS2521251

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity24.75
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity5.52
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1571.43%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.85MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screeenshot-2.png260.69KB81.33KB▼ 68.80%
screeenshot-4.png253.10KB80.81KB▼ 68.07%
screeenshot-6.png264.21KB75.55KB▼ 71.41%
screeenshot-1.png19.46KB7.36KB▼ 62.18%
screeenshot-5.png40.26KB14.12KB▼ 64.94%