73% wp-posts-showcase

Code Review | Wp Posts Showcase

WordPress plugin Wp Posts Showcase scored73%from 54 tests.

About plugin

  • Plugin page: wp-posts-showcase
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2016
  • Latest release: Jun 4, 2019
  • Number of updates: 23
  • Update frequency: every 47.4 days
  • Top authors: neelam.samariya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,096 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
Install script ran successfully

Server metrics [RAM: ▼0.82MB] [CPU: ▼35.63ms] Passed 4 tests

An overview of server-side resources used by Wp Posts Showcase
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.88 ▼4.49
Dashboard /wp-admin3.13 ▼0.2228.37 ▼37.49
Posts /wp-admin/edit.php3.13 ▼0.2324.95 ▼24.07
Add New Post /wp-admin/post-new.php3.13 ▼2.7623.71 ▼72.90
Media Library /wp-admin/upload.php3.13 ▼0.1026.32 ▼8.05
WP Posts Showcase /wp-admin/options-general.php?page=wp-posts-showcase3.1324.78

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
wp-posts-showcase_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Wp Posts Showcase
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲16813.59 ▼0.979.33 ▲7.1843.78 ▲1.82
Dashboard /wp-admin2,228 ▲515.84 ▲0.1993.06 ▼10.4040.32 ▼1.39
Posts /wp-admin/edit.php2,135 ▲352.26 ▲0.2340.39 ▲0.7435.10 ▼2.14
Add New Post /wp-admin/post-new.php1,550 ▲2423.80 ▲0.79651.71 ▲5.2736.79 ▼15.33
Media Library /wp-admin/upload.php1,433 ▲304.33 ▲0.09106.59 ▼3.0846.01 ▼2.37
WP Posts Showcase /wp-admin/options-general.php?page=wp-posts-showcase1,6452.5956.0032.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-posts-showcase/wp-posts-showcase.php+256
    Non-static method WpPostsShowcaseGenerator::add_showcase_data() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-posts-showcase
    • > Deprecated in wp-content/plugins/wp-posts-showcase/wp-posts-showcase.php+256
    Non-static method WpPostsShowcaseGenerator::add_showcase_data() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-posts-showcase
    • > Warning in wp-content/plugins/wp-posts-showcase/includes/utils.class.php+30
    Creating default object from empty value
    • > GET request to /wp-admin/options-general.php?page=wp-posts-showcase
    • > Notice in wp-content/plugins/wp-posts-showcase/wp-posts-showcase.php+370
    Uninitialized string offset: 1
    • > GET request to /wp-admin/options-general.php?page=wp-posts-showcase
    • > Notice in wp-content/plugins/wp-posts-showcase/wp-posts-showcase.php+370
    Uninitialized string offset: 2
    • > GET request to /wp-admin/options-general.php?page=wp-posts-showcase
    • > Notice in wp-content/plugins/wp-posts-showcase/wp-posts-showcase.php+370
    Uninitialized string offset: 3

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Wp Posts Showcase activation in plugins page.), #2 (Wp Posts showcase in settings menu link.), #3 (Wp Posts showcase settings page.), #4 (Wp Posts showcase button in post/page editor to add shortcode directly.), #5 (Frontend page for posts showcase.), #6 (Responsive wp posts showcase mobile.), #7 (Responsive wp posts showcase tablet.), #8 (4 Column layout for Posts showcase.)
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can look at the official readme.txt

wp-posts-showcase/wp-posts-showcase.php Passed 13 tests

"Wp Posts Showcase" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
106 characters long description:
Fully Responsive and Mobile Friendly way to showcase your featured posts or custom post types on frontend.

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 detected1,076 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5108122575
CSS26332362
JavaScript33712139

PHP code Passed 2 tests

This is a very shot review 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.28
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods730.43%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.64MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png144.86KB67.91KB▼ 53.12%
images/shortcode-icon.png0.55KB0.69KB0.00%
screenshot-1.png73.33KB40.14KB▼ 45.26%
screenshot-2.png73.46KB40.74KB▼ 44.54%
screenshot-7.png58.05KB22.78KB▼ 60.76%