83% wpview

Code Review | Display Custom Fields - wpView

WordPress plugin Display Custom Fields - wpView scored 83% from 54 tests.

About plugin

  • Plugin page: wpview
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7
  • WordPress version: 5.9.2
  • First release: Aug 22, 2016
  • Latest release: Mar 4, 2017
  • Number of updates: 32
  • Update frequency: every 6.1 days
  • Top authors: gvplugins (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 6,534 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.81MB] [CPU: ▼290.51ms] Passed 4 tests

This is a short check of server-side resources used by Display Custom Fields - wpView
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.40 ▲0.8956.28 ▲3.66
Dashboard /wp-admin4.25 ▲0.8439.17 ▲4.35
Posts /wp-admin/edit.php4.47 ▲0.8342.01 ▲5.16
Add New Post /wp-admin/post-new.php7.74 ▲0.7495.29 ▼1,170.72
Media Library /wp-admin/upload.php4.13 ▲0.8326.52 ▲0.67
Field Settings /wp-admin/admin.php?page=wpview4.0923.53
Colors & Styles /wp-admin/admin.php?page=wpview_colors_and_styles4.0925.57

Server storage [IO: ▲0.61MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 55 new files
Database: no new tables, 2 new options
New WordPress options
wpview_options_views
wpview_options_colors

Browser metrics Passed 4 tests

An overview of browser requirements for Display Custom Fields - wpView
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,846 ▲10416.12 ▲0.466.09 ▼1.322.99 ▲0.56
Dashboard /wp-admin2,940 ▲796.19 ▲0.03120.62 ▼10.55155.81 ▼7.94
Posts /wp-admin/edit.php2,737 ▲493.26 ▲0.0274.37 ▲10.19155.00 ▲9.20
Add New Post /wp-admin/post-new.php1,700 ▼5216.38 ▼4.50429.96 ▼40.38177.65 ▲23.98
Media Library /wp-admin/upload.php1,750 ▲525.76 ▲0.23130.63 ▼4.40189.55 ▼0.44
Field Settings /wp-admin/admin.php?page=wpview1,1842.7658.07145.56
Colors & Styles /wp-admin/admin.php?page=wpview_colors_and_styles5,4362.6082.49121.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 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
  • The uninstall procedure has failed, leaving 2 options in the database
    • wpview_options_colors
    • wpview_options_views

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\views\\View' not found in wp-content/plugins/wpview/includes/wpView/views/FileView.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\views\\View' not found in wp-content/plugins/wpview/includes/wpView/views/HyperlinkView.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\views\\View' not found in wp-content/plugins/wpview/includes/wpView/views/DateView.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\plugins\\Plugin' not found in wp-content/plugins/wpview/includes/wpView/plugins/WCKPlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\views\\View' not found in wp-content/plugins/wpview/includes/wpView/views/TextView.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\views\\View' not found in wp-content/plugins/wpview/includes/wpView/views/SelectView.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\plugins\\Plugin' not found in wp-content/plugins/wpview/includes/wpView/plugins/ACFPlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\views\\View' not found in wp-content/plugins/wpview/includes/wpView/views/RelationView.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\views\\View' not found in wp-content/plugins/wpview/includes/wpView/views/MapView.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpView\\views\\View' not found in wp-content/plugins/wpview/includes/wpView/views/ColorView.php:5

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 Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: front-end, custom field view, display custom field, field, custom fields...

wpview/wpview.php 85% from 13 tests

The main PHP file in "Display Custom Fields - wpView" ver. 1.3.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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected7,461 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP26206115,182
JavaScript8147581,211
CSS497121,004
SVG10064

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 172)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity37.04
▷ Minimum class complexity1.00
▷ Maximum class complexity232.00
Average method complexity9.75
▷ Minimum method complexity1.00
▷ Maximum method complexity172.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes25
▷ Abstract classes28.00%
▷ Concrete classes2392.00%
▷ Final classes00.00%
Methods106
▷ Static methods1514.15%
▷ Public methods7066.04%
▷ Protected methods2321.70%
▷ Private methods1312.26%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
8 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wpview.png4.45KB1.40KB▼ 68.58%
assets/images/wpview-fields.png49.33KB19.38KB▼ 60.71%
assets/images/acf.png2.78KB1.97KB▼ 29.13%
assets/images/CCTM.png3.14KB2.01KB▼ 36.05%
assets/images/Custom_Field_Suite.png2.80KB1.94KB▼ 30.81%