84% slide-leaf

Code Review | Leaf slide

WordPress plugin Leaf slide scored84%from 54 tests.

About plugin

  • Plugin page: slide-leaf
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.0
  • WordPress version: 6.3.1
  • First release: Mar 15, 2015
  • Latest release: Mar 15, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: DevUp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.31ms] Passed 4 tests

An overview of server-side resources used by Leaf slide
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.45 ▼4.48
Dashboard /wp-admin3.33 ▲0.0250.41 ▲2.34
Posts /wp-admin/edit.php3.38 ▲0.0249.04 ▲3.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.06 ▼18.31
Media Library /wp-admin/upload.php3.25 ▲0.0233.56 ▼0.78

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Leaf slide
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲6213.17 ▼1.181.76 ▼0.0742.68 ▲0.31
Dashboard /wp-admin2,206 ▲215.83 ▼0.05100.88 ▲0.2938.66 ▼3.50
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0339.40 ▲5.3533.48 ▼2.86
Add New Post /wp-admin/post-new.php1,522 ▼1117.62 ▼5.48657.76 ▲14.4959.02 ▲8.71
Media Library /wp-admin/upload.php1,399 ▲114.20 ▼0.0092.50 ▼18.5240.79 ▼8.32

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/slide-leaf/slide_leaf.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: slide, slider, a slider with the effect of the book, a book effect, animation slider...

slide-leaf/slide_leaf.php 92% from 13 tests

The principal PHP file in "Leaf slide" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("slide-leaf.php" instead of "slide_leaf.php")

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
Success! There were no dangerous files found in this plugin56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP120756

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.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 images were found in this plugin