67% wp-contact-slider

Code Review | WP Contact Slider

WordPress plugin WP Contact Slider scored67%from 54 tests.

About plugin

  • Plugin page: wp-contact-slider
  • Plugin version: 2.4.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2014
  • Latest release: Sep 20, 2023
  • Number of updates: 158
  • Update frequency: every 20.2 days
  • Top authors: wooexpert (74.05%)wpexpertsio (26.58%)

Code review

54 tests

User reviews

38 reviews

Install metrics

10,000+ active /279,849 total downloads

Benchmarks

Plugin footprint 65% 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: ▲5.18MB] [CPU: ▲18.28ms] 75% from 4 tests

Server-side resources used by WP Contact Slider
Please have a look at the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.18MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.05 ▲5.5962.34 ▲20.57
Dashboard /wp-admin9.09 ▲5.7571.19 ▲8.97
Posts /wp-admin/edit.php9.09 ▲5.7480.81 ▲31.29
Add New Post /wp-admin/post-new.php9.54 ▲3.65119.72 ▲12.30
Media Library /wp-admin/upload.php9.09 ▲5.8667.29 ▲34.03
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.0955.21

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 624 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
fs_accounts
can_compress_scripts
theysaidso_admin_options
fs_active_plugins
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Contact Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲19313.55 ▼0.838.69 ▲6.8329.62 ▼13.81
Dashboard /wp-admin2,226 ▲384.89 ▼0.99107.96 ▲4.8481.09 ▲38.78
Posts /wp-admin/edit.php2,121 ▲322.00 ▼0.0241.77 ▼0.1638.77 ▲2.05
Add New Post /wp-admin/post-new.php1,685 ▲14321.81 ▲3.52713.79 ▲99.8260.03 ▲0.79
Media Library /wp-admin/upload.php1,411 ▲264.23 ▲0.0497.14 ▼5.4679.38 ▲35.56
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0821.6825.0527.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-contact-slider/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • fs_active_plugins
    • widget_recent-posts
    • fs_accounts
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-contact-slider/inc/meta-box/inc/templates/audio.php
    • > /wp-content/plugins/wp-contact-slider/inc/meta-box/inc/templates/upload.php
    • > /wp-content/plugins/wp-contact-slider/inc/meta-box/inc/templates/video.php
    • > /wp-content/plugins/wp-contact-slider/inc/meta-box/inc/templates/image-advanced.php
    • > /wp-content/plugins/wp-contact-slider/inc/meta-box/inc/templates/media.php
  • 71× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Media_Field' not found in wp-content/plugins/wp-contact-slider/inc/meta-box/inc/fields/image-advanced.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-contact-slider/inc/wpcs_enque_scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-contact-slider/inc/wpcs_update_notice.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Walker_Base' not found in wp-content/plugins/wp-contact-slider/inc/meta-box/inc/walkers/select.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-contact-slider/inc/meta-box/inc/about/sections/upgrade.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Text_Field' not found in wp-content/plugins/wp-contact-slider/inc/meta-box/inc/fields/color.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Input_Field' not found in wp-content/plugins/wp-contact-slider/inc/meta-box/inc/fields/file-input.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Base_Storage' not found in wp-content/plugins/wp-contact-slider/inc/meta-box/inc/storages/post.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Object_Choice_Field' not found in wp-content/plugins/wp-contact-slider/inc/meta-box/inc/fields/sidebar.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/wp-contact-slider/inc/meta-box/inc/fields/choice.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt might help

wp-contact-slider/wp_contact_slider.php 92% from 13 tests

The main PHP script in "WP Contact Slider" version 2.4.10 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-contact-slider.php" instead of "wp_contact_slider.php")

Code Analysis 97% from 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 detected72,681 lines of code in 442 files:
LanguageFilesBlank linesComment linesLines of code
PHP27315,64434,74565,957
JavaScript945416052,839
CSS601831232,083
PO File115145671,384
Markdown21360386
JSON10027
SVG1005

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity53.87
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes167
▷ Abstract classes105.99%
▷ Concrete classes15794.01%
▷ Final classes00.00%
Methods2,741
▷ Static methods63323.09%
▷ Public methods1,98572.42%
▷ Protected methods582.12%
▷ Private methods69825.47%
Functions230
▷ Named functions22999.57%
▷ Anonymous functions10.43%
Constants274
▷ Global constants20273.72%
▷ Class constants7226.28%
▷ Public constants72100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
31 PNG files occupy 0.16MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
inc/meta-box/img/jqueryui/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
img/delete-sign.png0.82KB0.50KB▼ 39.50%
inc/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
freemius/assets/img/wp-contact-slider.png9.16KB5.26KB▼ 42.58%