10% common-options-for-vihvlcc-based-themes

Code Review | Common options for VihvLCC based themes

WordPress plugin Common options for VihvLCC based themes scored 10% from 54 tests.

About plugin

  • Plugin page: common-options-fo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.3
  • WordPress version: 5.9.2
  • First release: Aug 12, 2016
  • Latest release: Aug 12, 2016
  • Number of updates: 8
  • Update frequency: every 46.6 days
  • Top authors: Vihv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 461 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/common-options-for-vihvlcc-based-themes/common-options-for-vihvlcc-based-themes.php+16
    require_once(vihv/autoload.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.02MB] [CPU: ▼306.18ms] Passed 4 tests

An overview of server-side resources used by Common options for VihvLCC based themes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0154.08 ▼3.86
Dashboard /wp-admin3.41 ▲0.0036.28 ▲1.23
Posts /wp-admin/edit.php3.64 ▲0.0041.00 ▼34.28
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.81 ▼1,182.83
Media Library /wp-admin/upload.php3.29 ▲0.0026.33 ▼3.73

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 129 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Common options for VihvLCC based themes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4115.31 ▼0.338.00 ▲1.752.65 ▲0.11
Dashboard /wp-admin2,895 ▲346.13 ▼0.03125.15 ▼11.43163.46 ▼6.50
Posts /wp-admin/edit.php2,691 ▲63.23 ▼0.0164.19 ▼1.69150.33 ▼3.31
Add New Post /wp-admin/post-new.php1,711 ▼021.50 ▲0.34453.32 ▼1.75163.22 ▼2.87
Media Library /wp-admin/upload.php1,698 ▼05.47 ▼0.03186.05 ▲35.03194.35 ▼58.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 71× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(vihv/model/filter/DefaultDocFilter.php): failed to open stream: No such file or directory in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/model/XmlDocModel.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'vihv/misc/Locator.php' (include_path='.:/usr/share/php') in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/autoload.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'vihv\\Exception' not found in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/interface/ILogin.php:9
    • > PHP Warning
      require_once(vihv/exception/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/interface/IControl.php on line 4
    • > PHP Warning
      require_once(vihv/model/filter/Where.php): failed to open stream: No such file or directory in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/model/filter/DefaultDocFilter.php on line 4
    • > PHP Warning
      require_once(vihv/interface/ICmsPost.php): failed to open stream: No such file or directory in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/model/CMS/Wp/WpPost.php on line 4
    • > PHP Warning
      require_once(vihv/interface/IAcl.php): failed to open stream: No such file or directory in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/event/EventManager.php on line 4
    • > PHP Warning
      require_once(vihv/interface/ITheme.php): failed to open stream: No such file or directory in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/theme/XmlTheme.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'vihv/event/AuthorizationManager.php' (include_path='.:/usr/share/php') in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/acl/XmlAcl.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'vihv\\Control' not found in wp-content/plugins/common-options-for-vihvlcc-based-themes/vendor/pear-pear.vihv.org/vihv/vihv/control/CMS/Wp/WpWidgetControl.php:7

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Frontend with enabled debugger), #2 (Options page)
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

common-options-for-vihvlcc-based-themes/common-options-for-vihvlcc-based-themes.php 92% from 13 tests

The main file in "Common options for VihvLCC based themes" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin4,133 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP917291,1083,102
JavaScript53131511
XSLT91158263
CSS3215214
JSON30040
XML1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.69
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces20
Traits0
Classes84
▷ Abstract classes22.38%
▷ Concrete classes8297.62%
▷ Final classes00.00%
Methods418
▷ Static methods4410.53%
▷ Public methods40997.85%
▷ Protected methods40.96%
▷ Private methods51.20%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants12
▷ Global constants216.67%
▷ Class constants1083.33%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.15MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/pear-pear.vihv.org/vihv/vihv/img/opacity09white.png0.17KB0.12KB▼ 30.34%
vendor/pear-pear.vihv.org/vihv/vihv/img/opacity07white.png0.17KB0.12KB▼ 30.34%
vendor/pear-pear.vihv.org/vihv/vihv/img/lang/en.png0.63KB0.50KB▼ 21.17%
screenshot-2.png35.98KB13.76KB▼ 61.76%
vendor/pear-pear.vihv.org/vihv/vihv/img/lang/ru.png0.17KB0.14KB▼ 17.71%