10% addfunc-slides

Code Review | AddFunc Slides

WordPress plugin AddFunc Slides scored10%from 54 tests.

About plugin

  • Plugin page: addfunc-slides
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Aug 2, 2016
  • Latest release: Aug 15, 2019
  • Number of updates: 31
  • Update frequency: every 35.8 days
  • Top authors: joerhoney (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,995 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/addfunc-slides/addfunc-slides.php+566
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.58MB] [CPU: ▼52.63ms] Passed 4 tests

This is a short check of server-side resources used by AddFunc Slides
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.40 ▼1.066.09 ▼31.94
Dashboard /wp-admin2.42 ▼0.886.39 ▼43.92
Posts /wp-admin/edit.php2.42 ▼0.936.36 ▼42.27
Add New Post /wp-admin/post-new.php2.42 ▼3.466.38 ▼92.37
Media Library /wp-admin/upload.php2.42 ▼0.807.70 ▼27.79
Slidesets /wp-admin/edit-tags.php?taxonomy=slidesets&post_type=slides2.437.83
Settings /wp-admin/edit.php?post_type=slides&page=slides2.436.32
All Slides /wp-admin/edit.php?post_type=slides2.436.44
Add New /wp-admin/post-new.php?post_type=slides2.428.05

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_afswdgt
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by AddFunc Slides
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲9814.25 ▼0.301.82 ▲0.3243.62 ▲5.61
Dashboard /wp-admin2,230 ▲535.60 ▲0.0183.57 ▼8.1236.90 ▼0.14
Posts /wp-admin/edit.php2,135 ▲382.00 ▼0.0137.03 ▲1.1037.20 ▲2.60
Add New Post /wp-admin/post-new.php1,557 ▲3123.13 ▲0.27656.97 ▲51.22117.52 ▲49.32
Media Library /wp-admin/upload.php1,435 ▲354.22 ▲0.03118.36 ▲8.7950.01 ▲3.36
Slidesets /wp-admin/edit-tags.php?taxonomy=slidesets&post_type=slides1,3092.1229.7734.01
Settings /wp-admin/edit.php?post_type=slides&page=slides8642.0132.1730.65
All Slides /wp-admin/edit.php?post_type=slides1,1611.9633.6932.86
Add New /wp-admin/post-new.php?post_type=slides2,9118.10191.0083.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/addfunc-slides/addfunc-slides.php+566
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_afswdgt
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 75 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > Deprecated in wp-content/plugins/addfunc-slides/addfunc-slides.php+630
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=slides&page=slides
    • > Notice in wp-content/plugins/addfunc-slides/settings.php+42
    Trying to access array offset on value of type bool

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 items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/addfunc-slides/metaboxes.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addfunc-slides/edit-page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addfunc-slides/mce-buttons.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addfunc-slides/addfunc-slides.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addfunc-slides/help-tab.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=slides
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/addfunc-slides/js/addfunc-slides-admin-edit.js:22:21)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=slides
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=slides 2725:4 Uncaught TypeError: $ is not a function
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/addfunc-slides/js/addfunc-slides-admin.js?ver=1697893207:4:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

addfunc-slides/addfunc-slides.php 92% from 13 tests

"AddFunc Slides" version 2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 196 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected3,690 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS492881,489
PHP7671041,406
JavaScript62128746
SVG50149

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity206.00
▷ Minimum class complexity206.00
▷ Maximum class complexity206.00
Average method complexity52.25
▷ Minimum method complexity3.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/jquery.minicolors.png67.02KB34.31KB▼ 48.80%