79% enquir3-case-studies

Code Review | Enquir3 Case Studies

WordPress plugin Enquir3 Case Studies scored79%from 54 tests.

About plugin

  • Plugin page: enquir3-case-studies
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 16, 2020
  • Latest release: Aug 17, 2022
  • Number of updates: 11
  • Update frequency: every 72.0 days
  • Top authors: enquir3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /962 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.25ms] Passed 4 tests

An overview of server-side resources used by Enquir3 Case Studies
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.70 ▲6.16
Dashboard /wp-admin3.31 ▼0.0450.47 ▼7.61
Posts /wp-admin/edit.php3.36 ▲0.0045.14 ▲0.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.52 ▼17.36
Media Library /wp-admin/upload.php3.23 ▲0.0029.86 ▼0.82

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 79 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Enquir3 Case Studies: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.191.93 ▲0.1443.32 ▼1.42
Dashboard /wp-admin2,209 ▲185.90 ▲0.98100.70 ▼2.6343.09 ▲1.57
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.1035.43 ▼5.9231.96 ▼1.95
Add New Post /wp-admin/post-new.php1,543 ▲118.52 ▲0.27634.63 ▲24.0458.03 ▲8.88
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0294.13 ▼11.6142.15 ▼1.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/enquir3-case-studies/views/casestudy-article.tpl.php
    • > /wp-content/plugins/enquir3-case-studies/widgets/views/remsto-casestudy-block-item.tpl.php
    • > /wp-content/plugins/enquir3-case-studies/views/casestudy-confirmation-form.tpl.php
    • > /wp-content/plugins/enquir3-case-studies/views/casestudy-item.tpl.php
    • > /wp-content/plugins/enquir3-case-studies/includes/views/casestudy-mid-copy.tpl.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/enquir3-case-studies/includes/class-eq3cs-case-studies-management-table.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/enquir3-case-studies/widgets/views/remsto-casestudy-block-item.tpl.php on line 17
    • > PHP Notice
      Undefined variable: vars in wp-content/plugins/enquir3-case-studies/widgets/views/remsto-casestudy-block-item.tpl.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in /var/www/wordpress/wp-content/plugins/enquir3-case-studies/widgets/latest-casestudy.inc:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/enquir3-case-studies/views/casestudy-confirmation-form.tpl.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/enquir3-case-studies/views/casestudy-confirmation-form.tpl.php on line 5
    • > PHP Notice
      Undefined variable: vars in wp-content/plugins/enquir3-case-studies/views/casestudy-confirmation-form.tpl.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/enquir3-case-studies/includes/class-eq3cs-case-studies-management-table.php on line 7
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/enquir3-case-studies/includes/class-eq3cs-case-studies-management-table.php on line 7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: case studies, testimonial, feedback

enquir3-case-studies/enquir3-case-studies.php Passed 13 tests

Analyzing the main PHP file in "Enquir3 Case Studies" version 1.0.2
38 characters long description:
Case Studies using the Enquir3 System.

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,855 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript8365461,365
PHP82392481,236
Pascal5239559687
CSS58131329
Twig7400238

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.50
▷ Minimum class complexity18.00
▷ Maximum class complexity35.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods617.14%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
42 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
images/ui-icons_228ef1_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%
images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%