10% addfunc-slides

Code Review | AddFunc Slides

WordPress plugin AddFunc Slides scored 10% 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: 5.9.2
  • 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

30+ active / 2,635 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > 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: ▼2.15MB] [CPU: ▼358.67ms] 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.22 ▼1.295.31 ▼43.80
Dashboard /wp-admin2.24 ▼1.174.38 ▼32.24
Posts /wp-admin/edit.php2.24 ▼1.405.01 ▼34.13
Add New Post /wp-admin/post-new.php2.24 ▼4.735.59 ▼1,324.52
Media Library /wp-admin/upload.php2.24 ▼1.064.56 ▼24.13
Slidesets /wp-admin/edit-tags.php?taxonomy=slidesets&post_type=slides2.255.24
Settings /wp-admin/edit.php?post_type=slides&page=slides2.247.12
Add New /wp-admin/post-new.php?post_type=slides2.244.56
All Slides /wp-admin/edit.php?post_type=slides2.245.98

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 1 new option
New WordPress options
widget_afswdgt

Browser metrics Passed 4 tests

Checking browser requirements for AddFunc Slides
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,820 ▲6616.24 ▲0.616.78 ▲0.762.68 ▼0.23
Dashboard /wp-admin2,934 ▲766.14 ▼0.07147.66 ▲10.67176.55 ▲15.80
Posts /wp-admin/edit.php2,735 ▲413.23 ▼0.0197.88 ▲35.33158.91 ▲15.51
Add New Post /wp-admin/post-new.php1,789 ▲12822.43 ▲6.44443.35 ▼9.42160.32 ▼24.56
Media Library /wp-admin/upload.php1,745 ▲475.49 ▼0.08142.18 ▲3.85188.37 ▼2.83
Slidesets /wp-admin/edit-tags.php?taxonomy=slidesets&post_type=slides1,6612.6866.00158.68
Settings /wp-admin/edit.php?post_type=slides&page=slides1,0982.3760.29167.79
Add New /wp-admin/post-new.php?post_type=slides3,7989.97201.48302.72
All Slides /wp-admin/edit.php?post_type=slides1,4663.1968.24114.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > 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)`
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_afswdgt

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 75 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=slides
    • > POST request to /wp-admin/admin-ajax.php
    • > 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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > 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 get_option() in wp-content/plugins/addfunc-slides/metaboxes.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addfunc-slides/help-tab.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addfunc-slides/addfunc-slides.php:54

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=slides
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=slides 2702: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=5.9.2 1:31592 "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=1647251410:4:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2:2:30340)" 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=5.9.2 1:31702 Uncaught TypeError: $(...).live is not a function
    • > 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=5.9.2 1:31592 "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=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" 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=5.9.2 1:31702 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate 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
You can take inspiration from this readme.txt

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

The main file in "AddFunc Slides" v. 2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,690 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS492881,489
PHP7671041,406
JavaScript62128746
SVG50149

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
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%