77% case-study

Code Review | SVG Case Study

WordPress plugin SVG Case Study scored77%from 54 tests.

About plugin

  • Plugin page: case-study
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Nov 28, 2014
  • Latest release: Jul 3, 2020
  • Number of updates: 11
  • Update frequency: every 185.9 days
  • Top authors: augustinfotech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,922 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.50ms] Passed 4 tests

Server-side resources used by SVG Case Study
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.67 ▼1.08
Dashboard /wp-admin3.35 ▲0.0150.07 ▼12.62
Posts /wp-admin/edit.php3.47 ▲0.1150.41 ▼0.40
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.94 ▼11.88
Media Library /wp-admin/upload.php3.28 ▲0.0539.89 ▲4.75
All Case Studies /wp-admin/edit.php?post_type=casestudies3.3239.77
Case Studies Category /wp-admin/edit-tags.php?taxonomy=case_studies&post_type=casestudies3.3636.76
Add Case Study /wp-admin/post-new.php?post_type=casestudies3.4850.16
Case Studies Help /wp-admin/edit.php?post_type=casestudies&page=case-studies-help3.2441.95
Case Studies Settings /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting3.2738.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for SVG Case Study
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲22313.88 ▼0.6110.59 ▲8.8045.06 ▲0.91
Dashboard /wp-admin2,266 ▲604.88 ▼0.94109.47 ▲1.4637.75 ▼7.61
Posts /wp-admin/edit.php2,149 ▲492.22 ▲0.1734.77 ▼0.0834.52 ▼3.27
Add New Post /wp-admin/post-new.php1,564 ▲3317.53 ▼5.69671.07 ▼19.6457.80 ▼6.29
Media Library /wp-admin/upload.php1,445 ▲424.27 ▲0.0297.31 ▼10.6143.56 ▼3.64
All Case Studies /wp-admin/edit.php?post_type=casestudies1,1412.1832.0829.64
Case Studies Category /wp-admin/edit-tags.php?taxonomy=case_studies&post_type=casestudies1,3262.4228.7931.21
Add Case Study /wp-admin/post-new.php?post_type=casestudies2,8738.68177.7378.72
Case Studies Help /wp-admin/edit.php?post_type=casestudies&page=case-studies-help9881.8028.8131.83
Case Studies Settings /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting1,3483.2339.3580.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=casestudies
    • > Notice in wp-content/plugins/case-study/include/class_case_studies.php+546
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting
    • > Notice in wp-content/plugins/case-study/include/class_case_studies.php+201
    Undefined variable: CaseBannerImgCheckImg
    • > GET request to /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting
    • > Notice in wp-content/plugins/case-study/include/class_case_studies.php+214
    Undefined variable: CaseBannerSvgImgCheckImg
    • > GET request to /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting
    • > Notice in wp-content/plugins/case-study/include/class_case_studies.php+227
    Undefined variable: CaseListImgCheckImg
    • > GET request to /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting
    • > Notice in wp-content/plugins/case-study/include/class_case_studies.php+240
    Undefined variable: CaseListSvgImgCheckImg
    • > GET request to /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting
    • > Notice in wp-content/plugins/case-study/include/class_case_studies.php+253
    Undefined variable: CaseSliderImgCheckImg
    • > GET request to /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting
    • > Notice in wp-content/plugins/case-study/include/class_case_studies.php+266
    Undefined variable: CaseSliderSvgImgCheckImg
    • > GET request to /wp-admin/edit.php?post_type=casestudies&page=case-studies-setting
    • > Notice in wp-content/plugins/case-study/include/class_case_studies.php+270
    Undefined variable: casestudy_slider_svg_upload_image_id

SRP 50% 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
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/case-study/include/single-casestudies.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/case-study/casestudy.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/case-study/include/shortcode.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Add screen for case study category.), #2 (Edit screen for case study post.), #3 (Default images for banner, list, slider and fields for headings.), #4 (Case study help screen to describe how to use shotcodes.), #5 (Add shortcodes in page.), #6 (Display slider of single post with thumbnails.), #7 (Listing of all case study post.), #8 (ID's of featured case study post.), #9 (Return url of banner image for given post ID.)
You can take inspiration from this readme.txt

case-study/casestudy.php 85% from 13 tests

The main PHP file in "SVG Case Study" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("case-study.php" instead of "casestudy.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin8,519 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS512206,717
PHP4161471,067
JavaScript610989650
SVG80885

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity83.00
▷ Minimum class complexity83.00
▷ Maximum class complexity83.00
Average method complexity5.82
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 2.24MB with 1.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/images/no-img-w2.png18.80KB1.03KB▼ 94.50%
include/images/no-img-h4.png19.15KB1.02KB▼ 94.68%
include/images/screenshot3.png1.14KB0.87KB▼ 23.73%
include/images/play.png18.55KB0.76KB▼ 95.93%
include/images/screenshot1.png10.92KB7.10KB▼ 34.96%