84% latest-posts-slides

Code Review | Melabu WP Latest Posts Slides

WordPress plugin Melabu WP Latest Posts Slides scored84%from 54 tests.

About plugin

  • Plugin page: latest-posts-slides
  • Plugin version: 1.1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.7
  • WordPress version: 6.3.1
  • First release: Jun 19, 2016
  • Latest release: Jul 30, 2018
  • Number of updates: 40
  • Update frequency: every 26.4 days
  • Top authors: ProDeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

Server-side resources used by Melabu WP Latest Posts Slides
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2940.93 ▲2.30
Dashboard /wp-admin3.72 ▲0.3750.06 ▼8.24
Posts /wp-admin/edit.php3.77 ▲0.4153.05 ▲9.04
Add New Post /wp-admin/post-new.php4.94 ▼0.9551.22 ▼43.46
Media Library /wp-admin/upload.php3.58 ▲0.3542.33 ▲9.03
About /wp-admin/admin.php?page=melibu-plugin-latest-admin-control-menu-23.6237.58
MB LPS /wp-admin/admin.php?page=melibu-plugin-latest3.6036.51
Options /wp-admin/admin.php?page=melibu-plugin-latest-admin-control-menu-13.6937.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 81 new files
Database: 1 new table, 10 new options
New tables
wp_melibu_lps
New WordPress options
widget_theysaidso_widget
melibu-plugin-lps-db-version
widget_recent-comments
db_upgraded
melibu-plugin-lps-version
widget_recent-posts
widget_latest-posts-slides-id
can_compress_scripts
theysaidso_admin_options
mb-lps-admin-colors

Browser metrics Passed 4 tests

A check of browser resources used by Melabu WP Latest Posts Slides
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲17914.79 ▲0.212.78 ▲0.9244.23 ▲4.11
Dashboard /wp-admin2,275 ▲895.10 ▲0.21106.55 ▼2.8979.96 ▲38.63
Posts /wp-admin/edit.php2,152 ▲842.58 ▲0.5642.92 ▲6.4535.34 ▲1.77
Add New Post /wp-admin/post-new.php6,301 ▲4,76826.13 ▲2.891,005.63 ▲323.3439.83 ▼24.60
Media Library /wp-admin/upload.php1,466 ▲844.47 ▲0.2398.01 ▼13.3577.87 ▲33.85
About /wp-admin/admin.php?page=melibu-plugin-latest-admin-control-menu-21,3612.0033.0660.31
MB LPS /wp-admin/admin.php?page=melibu-plugin-latest1,1991.9626.0374.80
Options /wp-admin/admin.php?page=melibu-plugin-latest-admin-control-menu-12,6242.0130.2357.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_latest-posts-slides-id
    • mb-lps-admin-colors
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-posts-slides/html/main/dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-posts-slides/html/main/display.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-posts-slides/html/main/appearance.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-posts-slides/html/main/optionsobj.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-posts-slides/html/main/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-posts-slides/html/main/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function options() on null in wp-content/plugins/latest-posts-slides/html/panel.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/latest-posts-slides/classes/class.MelibuLPSshortWidget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/latest-posts-slides/classes/class.MelibuFrontend.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-posts-slides/html/main/permission.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: recent, melibu, melabu wp latest posts slides, latest, melabu...

latest-posts-slides/latest-posts-slides.php Passed 13 tests

The primary PHP file in "Melabu WP Latest Posts Slides" version 1.1.2.4 is used by WordPress to initiate all plugin functionality
100 characters long description:
Melabu WP Latest Posts Slides is a space-saving contribution Slider for last posts. Your Melibu Team

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 plugin4,825 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP244908732,912
JavaScript17172472979
PO File37151,296920
SVG1019
CSS5005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity35.33
▷ Minimum class complexity2.00
▷ Maximum class complexity112.00
Average method complexity7.24
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods66
▷ Static methods46.06%
▷ Public methods6192.42%
▷ Protected methods57.58%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.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
14 PNG files occupy 2.74MB with 1.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/other/shl.png616.38KB229.75KB▼ 62.73%
img/other/author-box.png585.97KB185.30KB▼ 68.38%
js/img/icon-MB-20.png1.97KB1.16KB▼ 41.49%
img/other/bitlyback.png188.56KB56.58KB▼ 69.99%
img/other/bitly.png12.09KB5.16KB▼ 57.36%