83% mk-posts-slider

Code Review | DMA Posts Slider

WordPress plugin DMA Posts Slider scored83%from 54 tests.

About plugin

  • Plugin page: mk-posts-slider
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Apr 8, 2023
  • Latest release: Apr 9, 2023
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: malaak4web (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /99 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by DMA Posts Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.19 ▼3.49
Dashboard /wp-admin3.31 ▼0.0448.13 ▼15.76
Posts /wp-admin/edit.php3.36 ▲0.0045.33 ▼7.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.24 ▼17.59
Media Library /wp-admin/upload.php3.23 ▲0.0031.59 ▼4.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for DMA Posts Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.26 ▼1.191.77 ▼0.2743.41 ▼0.87
Dashboard /wp-admin2,209 ▲234.83 ▼0.10105.44 ▼8.0038.82 ▼4.48
Posts /wp-admin/edit.php2,089 ▲31.98 ▼0.0239.60 ▲1.1134.56 ▼1.97
Add New Post /wp-admin/post-new.php1,514 ▼017.68 ▲0.03672.86 ▼14.4558.22 ▼7.25
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0095.69 ▼16.4841.55 ▼5.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mk-posts-slider/dma-posts-slider.php:21

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 90% from 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
4 plugin tags: posts, elementor, carousel, slider

mk-posts-slider/dma-posts-slider.php 77% from 13 tests

This is the main PHP file of "DMA Posts Slider" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mk-posts-slider.php" instead of "dma-posts-slider.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 160 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected561 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP489303470
JavaScript1111055
Markdown122036

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods19
▷ Static methods15.26%
▷ Public methods1684.21%
▷ Protected methods210.53%
▷ Private methods15.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.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 images were found in this plugin