78% shop-the-posts

Code Review | Shop The Posts

WordPress plugin Shop The Posts scored78%from 54 tests.

About plugin

  • Plugin page: shop-the-posts
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 28, 2018
  • Latest release: Jul 28, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: codelessthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.04ms] Passed 4 tests

Server-side resources used by Shop The Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.63 ▲0.61
Dashboard /wp-admin3.39 ▲0.0949.72 ▼0.42
Posts /wp-admin/edit.php3.51 ▲0.1547.16 ▲1.37
Add New Post /wp-admin/post-new.php6.00 ▲0.1283.20 ▼9.19
Media Library /wp-admin/upload.php3.32 ▲0.0934.08 ▼3.14

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shop The Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.63 ▼0.645.51 ▲3.7340.79 ▲0.84
Dashboard /wp-admin2,207 ▲165.82 ▲0.91101.95 ▼0.5438.22 ▼4.71
Posts /wp-admin/edit.php2,079 ▼102.31 ▲0.3042.20 ▲7.3333.56 ▼1.08
Add New Post /wp-admin/post-new.php6,317 ▲4,78126.18 ▲2.79905.90 ▲293.7240.43 ▼18.66
Media Library /wp-admin/upload.php1,389 ▼24.21 ▼0.1193.06 ▼4.2044.10 ▲0.45

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/shop-the-posts/public/partials/shop-the-posts-public-display.php
    • > /wp-content/plugins/shop-the-posts/admin/partials/shop-the-posts-admin-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/shop-the-posts/public/partials/list-content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/shop-the-posts/public/partials/single-content.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Image 1), #2 (Image 2)
Please take inspiration from this readme.txt

shop-the-posts/shop-the-posts.php Passed 13 tests

The main file in "Shop The Posts" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected660 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP16200611483
CSS3211690
JavaScript3457087

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.56
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods42
▷ Static methods37.14%
▷ Public methods3583.33%
▷ Protected methods00.00%
▷ Private methods716.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected