77% smart-post-lists-light

Code Review | Smart Post Lists Light

WordPress plugin Smart Post Lists Light scored77%from 54 tests.

About plugin

  • Plugin page: smart-post-lists-...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 6.3.1
  • First release: May 24, 2012
  • Latest release: Mar 29, 2022
  • Number of updates: 38
  • Update frequency: every 94.7 days
  • Top authors: OTWthemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /26,648 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.71ms] Passed 4 tests

Server-side resources used by Smart Post Lists Light
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.43 ▲1.67
Dashboard /wp-admin3.36 ▲0.0554.68 ▼0.72
Posts /wp-admin/edit.php3.47 ▲0.1248.54 ▼0.86
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.41 ▼4.73
Media Library /wp-admin/upload.php3.28 ▲0.0534.29 ▼0.53
License Manager /wp-admin/admin.php?page=otw-spl-lm3.34261.07
otwfcr /wp-admin/admin.php?page=otwfcr3.2531.16
Plugin Options /wp-admin/admin.php?page=otw-spl3.2927.90

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_smart-post-list-widget
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Post Lists Light
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16813.61 ▼0.765.91 ▲4.0042.94 ▼5.70
Dashboard /wp-admin2,244 ▲564.83 ▼0.05106.65 ▼2.1638.68 ▼1.41
Posts /wp-admin/edit.php2,127 ▲382.05 ▲0.0835.19 ▼4.9533.46 ▼4.15
Add New Post /wp-admin/post-new.php1,547 ▲3323.26 ▲5.67692.68 ▼10.6066.95 ▲13.19
Media Library /wp-admin/upload.php1,426 ▲384.24 ▲0.0593.81 ▼2.0240.72 ▼0.54
License Manager /wp-admin/admin.php?page=otw-spl-lm9382.0324.9327.41
otwfcr /wp-admin/admin.php?page=otwfcr7782.0324.4021.06
Plugin Options /wp-admin/admin.php?page=otw-spl9032.1523.2337.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_smart-post-list-widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/smart-post-lists-light/include/otw_components/otw_factory/views/action_message.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/smart-post-lists-light/include/otw_components/otw_factory/otw_factory.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/smart-post-lists-light/splw.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/smart-post-lists-light/include/otw_spll_process_actions.php:6
    • > PHP Notice
      Undefined variable: return_url in wp-content/plugins/smart-post-lists-light/include/otw_components/otw_factory/views/action_message.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/smart-post-lists-light/include/otw_labels/otw_spll_factory_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/smart-post-lists-light/include/otw_spl_plugin_options.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smart-post-lists-light/include/otw_components/otw_factory/views/license_manager.php:3

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 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Widget settings), #2 (A list with images, titles, dates and comments), #3 (Titles and excerpts), #4 (Only images), #5 (Images with title), #6 (Only titles), #7 (Image left of text), #8 (Image right of text)
  • 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

smart-post-lists-light/splw.php 85% from 13 tests

The entry point to "Smart Post Lists Light" version 1.8 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("smart-post-lists-light.php" instead of "splw.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 725 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin7,405 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS341242,600
PHP106562472,117
JavaScript10017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity119.00
▷ Minimum class complexity60.00
▷ Maximum class complexity193.00
Average method complexity8.08
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods4386.00%
▷ Protected methods00.00%
▷ Private methods714.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.70MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png88.35KB26.27KB▼ 70.26%
screenshot-3.png8.05KB3.28KB▼ 59.27%
screenshot-8.png159.22KB46.19KB▼ 70.99%
screenshot-1.png26.53KB10.67KB▼ 59.79%
screenshot-4.png126.23KB37.88KB▼ 69.99%