78% diviner-archive

Code Review | Diviner Archive

WordPress plugin Diviner Archive scored78%from 54 tests.

About plugin

  • Plugin page: diviner-archive
  • Plugin version: 0.5.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2019
  • Latest release: Feb 18, 2020
  • Number of updates: 16
  • Update frequency: every 15.5 days
  • Top authors: ncpr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.93ms] Passed 4 tests

This is a short check of server-side resources used by Diviner Archive
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.34 ▼6.40
Dashboard /wp-admin3.31 ▲0.0051.51 ▼1.53
Posts /wp-admin/edit.php3.36 ▲0.0050.60 ▼20.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.28 ▼3.50
Media Library /wp-admin/upload.php3.23 ▲0.0038.84 ▲0.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 730 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Diviner Archive
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.154.80 ▲2.9544.87 ▲5.34
Dashboard /wp-admin2,206 ▲184.85 ▼0.05107.41 ▲6.5441.13 ▼2.58
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0539.03 ▼5.8836.95 ▼1.25
Add New Post /wp-admin/post-new.php1,533 ▲1923.18 ▲5.52649.76 ▼32.3052.13 ▼4.18
Media Library /wp-admin/upload.php1,382 ▼64.27 ▲0.1095.94 ▼20.0243.21 ▼4.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/diviner-archive/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 254× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/diviner-archive/vendor/htmlburger/carbon-fields/templates/Container/nav_menu_item.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/diviner-archive/vendor/htmlburger/carbon-fields/core/Container/Term_Meta_Container.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/diviner-archive/vendor/composer/installers/src/Composer/Installers/Plugin.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/diviner-archive/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'NCPR\\DivinerArchivePlugin\\Controller\\Controller' not found in wp-content/plugins/diviner-archive/src/Controller/EnqueueController.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/diviner-archive/vendor/htmlburger/carbon-fields/core/Field/Broken_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Undefined constant 'NCPR\\DivinerArchivePlugin\\PLUGIN_NAME' in wp-content/plugins/diviner-archive/views/errors/compatibility-notice.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/diviner-archive/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php:9
    • > PHP Notice
      Undefined variable: plural in wp-content/plugins/diviner-archive/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 32
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/diviner-archive/src/CPT/Diviner_Field/Preset_Fields_List_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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: fields, search, archive

diviner-archive/diviner-archive.php 92% from 13 tests

The main PHP file in "Diviner Archive" ver. 0.5.2 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:
  • Domain Path: The domain path folder was not found ("/resources/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin38,788 lines of code in 655 files:
LanguageFilesBlank linesComment linesLines of code
PHP3674,38210,91518,243
JavaScript1765,1688,37812,901
PO File206498151,790
Sass4832701,723
CSS133231,1451,634
C118847879
JSON900871
Markdown10950356
C/C++ Header24046132
reStructuredText19413597
YAML313061
XML33043
m41111141
SVG10017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.01
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces53
Interfaces16
Traits1
Classes293
▷ Abstract classes144.78%
▷ Concrete classes27995.22%
▷ Final classes41.43%
Methods1,502
▷ Static methods21614.38%
▷ Public methods1,24682.96%
▷ Protected methods24616.38%
▷ Private methods100.67%
Functions205
▷ Named functions2411.71%
▷ Anonymous functions18188.29%
Constants149
▷ Global constants117.38%
▷ Class constants13892.62%
▷ Public constants138100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected