62% sherk-skills-landing-pages

Code Review | Sherk Skills Landing Pages Plugin

WordPress plugin Sherk Skills Landing Pages Plugin scored62%from 54 tests.

About plugin

  • Plugin page: sherk-skills-land...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Apr 21, 2015
  • Latest release: May 15, 2015
  • Number of updates: 16
  • Update frequency: every 1.7 days
  • Top authors: sherkspear (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,119 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.70MB] [CPU: ▼47.55ms] Passed 4 tests

Server-side resources used by Sherk Skills Landing Pages Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.179.34 ▼38.28
Dashboard /wp-admin2.31 ▼1.0011.07 ▼38.22
Posts /wp-admin/edit.php2.31 ▼1.0511.45 ▼33.69
Add New Post /wp-admin/post-new.php2.31 ▼3.5810.01 ▼80.01
Media Library /wp-admin/upload.php2.31 ▼0.9211.06 ▼20.80
How To Use /wp-admin/edit.php?post_type=sherk_skills&page=sherkskills_info2.3110.78
Add New /wp-admin/post-new.php?post_type=sherk_skills2.3110.61
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=sherk_skills2.3111.02
Skills Category /wp-admin/edit-tags.php?taxonomy=sherk_skills_cat&post_type=sherk_skills2.3111.45
Sherk Skills /wp-admin/edit.php?post_type=sherk_skills2.3111.23

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
widget_sherk_skills_widget_id
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Sherk Skills Landing Pages Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲19514.02 ▼0.357.21 ▲4.9843.01 ▼5.39
Dashboard /wp-admin2,242 ▲515.83 ▲0.8999.89 ▼15.5139.12 ▼4.71
Posts /wp-admin/edit.php2,131 ▲422.00 ▼0.0539.13 ▲0.5435.40 ▲3.44
Add New Post /wp-admin/post-new.php1,568 ▲5423.43 ▼0.24645.57 ▼20.7459.62 ▲4.63
Media Library /wp-admin/upload.php1,430 ▲454.33 ▲0.0594.84 ▼6.1040.44 ▼2.21
How To Use /wp-admin/edit.php?post_type=sherk_skills&page=sherkskills_info1,1912.2028.6540.35
Add New /wp-admin/post-new.php?post_type=sherk_skills2,5847.97194.5369.91
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=sherk_skills1,3462.1438.5336.63
Skills Category /wp-admin/edit-tags.php?taxonomy=sherk_skills_cat&post_type=sherk_skills1,2982.1427.2326.62
Sherk Skills /wp-admin/edit.php?post_type=sherk_skills1,1171.9529.7429.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SherkSkillsWidget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_sherk_skills_widget_id
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sherk_skills
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SherkSkillsWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sherk_skills
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sherk_skills
    • > Notice in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsCssJsScripts.php+59
    Trying to get property 'post_type' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sherk_skills
    • > Notice in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsMetaBox.php+139
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=sherk_skills
    • > Warning in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsMetaBox.php+30
    Illegal string offset '_sherk_skills_meta_websites'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sherk_skills
    • > Notice in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsMetaBox.php+68
    Array to string conversion
    • > GET request to /wp-admin/post-new.php?post_type=sherk_skills
    • > Warning in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsMetaBox.php+68
    Illegal string offset '_sherk_skills_meta_videos'

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsCssJsScripts.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsWidget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsMenu.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'SherkSkills' not found in wp-content/plugins/sherk-skills-landing-pages/templates/sherkskills_dashboard.php:86
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-skills-landing-pages/includes/CPT_SherkSkills.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsHelper.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsShortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/sherk-skills-landing-pages/templates/single-sherk_skills-content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsMetaBox.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-skills-landing-pages/includes/SherkSkillsHelper.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=sherk_skills
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=sherk_skills 0:0 Uncaught SyntaxError: Unexpected end of JSON input

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Screenshot #8 (Added shortcode functionality to display a carousel of skills. ex. **[sherkskills title="These are my Skills"]**) image required
You can take inspiration from this readme.txt

sherk-skills-landing-pages/sherk_skills.php 92% from 13 tests

The main PHP file in "Sherk Skills Landing Pages Plugin" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sherk-skills-landing-pages.php" instead of "sherk_skills.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,913 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3103470995
PHP1022794641
CSS24822220
Markdown133057

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/glyphicons.png108.59KB52.69KB▼ 51.48%
assets/img/glyphicons-halflings.png13.50KB10.35KB▼ 23.34%
assets/images/logo.png49.81KB14.78KB▼ 70.33%
assets/css/images/controls.png2.74KB1.42KB▼ 48.29%
assets/images/controls.png2.74KB1.42KB▼ 48.29%