73% advanced-post-slider

Code Review | Advanced post slider

WordPress plugin Advanced post slider scored 73% from 54 tests.

About plugin

  • Plugin page: advanced-post-slider
  • Plugin version: 2.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 5.9.2
  • First release: Oct 20, 2013
  • Latest release: May 19, 2018
  • Number of updates: 65
  • Update frequency: every 25.8 days
  • Top authors: digontoahsan (100%)

Code review

54 tests

User reviews

94 reviews

Install metrics

8,000+ active / 225,926 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼284.61ms] Passed 4 tests

Analyzing server-side resources used by Advanced post slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2558.06 ▼1.02
Dashboard /wp-admin3.61 ▲0.1954.28 ▲19.14
Posts /wp-admin/edit.php3.83 ▲0.1937.94 ▼3.92
Add New Post /wp-admin/post-new.php7.07 ▲0.0995.39 ▼1,151.02
Media Library /wp-admin/upload.php3.48 ▲0.1840.45 ▲17.54

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 22 new files
Database: 2 new tables, 6 new options
New tables
wp_advps_optionset
wp_advps_thumbnail
New WordPress options
advps-db-version
advps-update-notification
advpssmethod1
advpssmethod2
advpssmethod3
advps-curr-version

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced post slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,926 ▲18216.31 ▲0.689.04 ▲3.092.27 ▼0.16
Dashboard /wp-admin2,912 ▲596.15 ▼0.02122.44 ▼61.18175.74 ▲6.88
Posts /wp-admin/edit.php2,690 ▼13.25 ▲0.0173.53 ▲3.53203.37 ▼6.55
Add New Post /wp-admin/post-new.php1,674 ▼3716.54 ▼4.84425.76 ▼57.21163.64 ▼23.81
Media Library /wp-admin/upload.php1,721 ▲235.52 ▼0.02145.95 ▼26.54193.47 ▲1.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_advps_optionset
    • wp_advps_thumbnail
  • This plugin does not fully uninstall, leaving 6 options in the database
    • advpssmethod3
    • advpssmethod2
    • advps-update-notification
    • advpssmethod1
    • advps-db-version
    • advps-curr-version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-post-slider/advanced-post-slider.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

advanced-post-slider/advanced-post-slider.php 92% from 13 tests

"Advanced post slider" version 2.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)

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
Good job! No executable or dangerous file extensions detected4,005 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP71361103,208
JavaScript54396410
CSS26641387

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.58
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/down.png2.77KB0.11KB▼ 95.95%
images/upb.png0.96KB0.11KB▼ 88.15%
images/downb.png0.15KB0.11KB▼ 24.84%
images/up.png2.79KB0.11KB▼ 95.94%
images/controls.png2.74KB1.42KB▼ 48.29%