10% priornotify

Code Review | PriorNotify

WordPress plugin PriorNotify scored10%from 54 tests.

About plugin

  • Plugin page: priornotify
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-6.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: Jan 2, 2023
  • Number of updates: 292
  • Update frequency: every 1.8 days
  • Top authors: rudicoderllc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /878 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > User deprecated in wp-content/plugins/priornotify/vendor/scssphp/scssphp/src/Compiler.php+5479
    The method "setFormatter" is deprecated. Use "setOutputStyle" instead.

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

An overview of server-side resources used by PriorNotify
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.09 ▼7.84
Dashboard /wp-admin3.31 ▲0.0045.53 ▼4.33
Posts /wp-admin/edit.php3.36 ▲0.0045.16 ▼4.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.53 ▲4.71
Media Library /wp-admin/upload.php3.23 ▲0.0032.69 ▼1.09

Server storage [IO: ▲1.66MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • Illegal file modification detected: 1 file (4.63KB) outside of "wp-content/plugins/priornotify/" and "wp-content/uploads/"
    • (new file) wp-admin/ArraypriorNotify.min.css
Filesystem: 429 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by PriorNotify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.201.81 ▼0.3142.20 ▼7.00
Dashboard /wp-admin2,206 ▲175.90 ▲0.77105.05 ▼15.2341.84 ▼5.94
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0040.32 ▲3.1435.18 ▲1.42
Add New Post /wp-admin/post-new.php1,519 ▼1723.56 ▲0.40670.15 ▼18.1151.86 ▼5.53
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.04105.74 ▼7.2947.12 ▲1.24

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/priornotify/priorNotify-plugin.php
  • 164× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/priornotify/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/priornotify/vendor/twig/twig/src/TokenParser/DoTokenParser.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/priornotify/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/priornotify/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/priornotify/vendor/twig/twig/src/TokenParser/UseTokenParser.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\Config' not found in wp-content/plugins/priornotify/vendor/twig/twig/.php-cs-fixer.dist.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\TestExpression' not found in wp-content/plugins/priornotify/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/priornotify/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/priornotify/vendor/twig/twig/src/Extension/StagingExtension.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/priornotify/vendor/symfony/yaml/Command/LintCommand.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
9 plugin tags: drinks, wine, import, food, fda...

priornotify/priorNotify-plugin.php 85% from 13 tests

"PriorNotify" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("priornotify.php" instead of "priorNotify-plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected33,448 lines of code in 412 files:
LanguageFilesBlank linesComment linesLines of code
PHP2676,4709,88928,278
reStructuredText1142,4942,4092,934
JSON900915
Markdown101870372
Sass13810341
YAML45033214
make1245124
JavaScript1211118
Twig115069
Bourne Shell16143
Python17316533
XML1156
CSS1001

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,431)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 199)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity19.60
▷ Minimum class complexity1.00
▷ Maximum class complexity1,431.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity199.00
Code structure
Namespaces45
Interfaces15
Traits0
Classes229
▷ Abstract classes135.68%
▷ Concrete classes21694.32%
▷ Final classes6429.63%
Methods1,481
▷ Static methods1469.86%
▷ Public methods96965.43%
▷ Protected methods35523.97%
▷ Private methods15710.60%
Functions202
▷ Named functions15878.22%
▷ Anonymous functions4421.78%
Constants155
▷ Global constants74.52%
▷ Class constants14895.48%
▷ Public constants14698.65%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png51.85KB26.87KB▼ 48.17%