84% latest-post-slider

Code Review | Latest Post Slider

WordPress plugin Latest Post Slider scored84%from 54 tests.

About plugin

  • Plugin page: latest-post-slider
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Apr 4, 2015
  • Latest release: May 17, 2015
  • Number of updates: 7
  • Update frequency: every 6.3 days
  • Top authors: mssrivathsan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Latest Post Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.06 ▼5.85
Dashboard /wp-admin3.32 ▲0.0153.38 ▼0.18
Posts /wp-admin/edit.php3.37 ▲0.0158.23 ▲8.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.41 ▲2.15
Media Library /wp-admin/upload.php3.24 ▲0.0141.35 ▲5.09

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_latest_post_slider
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Latest Post Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.37 ▼0.981.81 ▲0.0343.52 ▼1.20
Dashboard /wp-admin2,206 ▲185.86 ▲0.9899.02 ▼14.7341.13 ▼1.45
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0044.93 ▲8.9636.82 ▲6.21
Add New Post /wp-admin/post-new.php1,520 ▼1323.36 ▼0.08722.94 ▲33.5855.89 ▼4.29
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.03112.01 ▲13.2851.99 ▲5.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_latest_post_slider
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/latest-post-slider/featured.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/latest-post-slider/trunk/featured.php:44

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: featured slider, post slider, latest post slider

latest-post-slider/featured.php 92% from 13 tests

The main PHP script in "Latest Post Slider" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("latest-post-slider.php" instead of "featured.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin457 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP223372457

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin