78% village-client-area

Code Review | Village Client Area

WordPress plugin Village Client Area scored78%from 54 tests.

About plugin

  • Plugin page: village-client-area
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Jun 13, 2016
  • Number of updates: 38
  • Update frequency: every 8.1 days
  • Top authors: justnorris (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /8,976 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
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.37ms] Passed 4 tests

This is a short check of server-side resources used by Village Client Area
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1638.47 ▼2.08
Dashboard /wp-admin3.45 ▲0.1048.06 ▼10.69
Posts /wp-admin/edit.php3.56 ▲0.2046.75 ▼1.27
Add New Post /wp-admin/post-new.php6.03 ▲0.1492.22 ▼3.42
Media Library /wp-admin/upload.php3.37 ▲0.1440.06 ▲3.95
Add New /wp-admin/post-new.php?post_type=client_gallery3.5048.59
All Galleries /wp-admin/edit.php?post_type=client_gallery3.4136.32

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 71 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Village Client Area
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.21 ▼1.164.69 ▲3.0439.82 ▼8.22
Dashboard /wp-admin2,233 ▲454.86 ▼0.9699.52 ▼6.5439.51 ▼5.40
Posts /wp-admin/edit.php2,119 ▲302.02 ▲0.0239.58 ▲2.8134.31 ▲0.83
Add New Post /wp-admin/post-new.php1,559 ▲2623.20 ▲0.19588.08 ▼98.9959.26 ▼4.54
Media Library /wp-admin/upload.php1,415 ▲274.25 ▲0.0795.15 ▼8.1141.92 ▼1.50
Add New /wp-admin/post-new.php?post_type=client_gallery2,5077.70188.5871.58
All Galleries /wp-admin/edit.php?post_type=client_gallery1,1111.9531.8929.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/village-client-area/templates/global/wrapper-end.php
    • > /wp-content/plugins/village-client-area/templates/global/wrapper-start.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/village-client-area/layout/template-functions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/village-client-area/templates/protected/protected-content.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VCA() in wp-content/plugins/village-client-area/includes/options.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/village-client-area/includes/enqueue.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vca_get_template_part() in wp-content/plugins/village-client-area/templates/single-client_gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/village-client-area/templates/single/content-description.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/village-client-area/templates/single/image-actions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_password_required() in wp-content/plugins/village-client-area/templates/client-comments.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/village-client-area/templates/single/layout.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/village-client-area/templates/single/js-markup.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === village-client-area === )
The official readme.txt might help

village-client-area/village-client-area.php 92% from 13 tests

The main PHP file in "Village Client Area" ver. 1.1.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin6,076 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,1581,9144,096
PHP345432811,342
CoffeeScript1721462429
Sass61095208
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity17.00
▷ Minimum class complexity7.00
▷ Maximum class complexity33.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods42
▷ Static methods2559.52%
▷ Public methods4197.62%
▷ Protected methods00.00%
▷ Private methods12.38%
Functions16
▷ Named functions16100.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
No PNG files were detected