78% for-your-eyes-only

Code Review | For Your Eyes Only

WordPress plugin For Your Eyes Only scored 78% from 54 tests.

About plugin

  • Plugin page: for-your-eyes-only
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2019
  • Latest release: Apr 10, 2019
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: Takahashi_Fumiki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 631 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.92ms] Passed 4 tests

A check of server-side resources used by For Your Eyes Only
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.34 ▼8.86
Dashboard /wp-admin3.33 ▲0.0253.03 ▲0.67
Posts /wp-admin/edit.php3.44 ▲0.0846.82 ▲1.17
Add New Post /wp-admin/post-new.php5.92 ▲0.03100.80 ▲12.05
Media Library /wp-admin/upload.php3.25 ▲0.0234.52 ▼0.64

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for For Your Eyes Only
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.58 ▼0.821.79 ▼0.0439.54 ▼6.69
Dashboard /wp-admin2,203 ▲154.87 ▼1.09101.39 ▼18.8541.79 ▼6.21
Posts /wp-admin/edit.php2,089 ▲32.04 ▼0.0037.51 ▼1.9532.06 ▼4.59
Add New Post /wp-admin/post-new.php6,416 ▲4,87320.87 ▲2.71836.37 ▲223.6953.26 ▼9.68
Media Library /wp-admin/upload.php1,382 ▼64.24 ▲0.0597.35 ▼14.5645.60 ▼0.41

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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 | 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/bin/entities.php
  • 28× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Parser\\EventHandler' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/test/HTML5/Parser/EventStack.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/test/HTML5/Serializer/TraverserTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Parser\\StringInputStream' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Parser\\EventHandler' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/test/HTML5/Parser/CharacterReferenceTest.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Parser\\InputStream' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\ForYourEyesOnly\\Pattern\\Singleton' not found in wp-content/plugins/for-your-eyes-only/app/Hametuha/ForYourEyesOnly/Pattern/RestApi.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Serializer\\RulesInterface' not found in wp-content/plugins/for-your-eyes-only/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php:17

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)
Everything seems fine, but this is not an exhaustive test

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
4 plugin tags: login, membership, restrict, gutenberg

for-your-eyes-only/for-your-eyes-only.php 85% from 13 tests

The main PHP file in "For Your Eyes Only" ver. 1.0.1 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: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Git Repository: Please remove the Git repository from this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected16,586 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PHP541,3412,43310,304
HTML41,089565,286
Markdown51270357
JSON500201
JavaScript42115139
Sass3190100
YAML26077
PO File1242570
XML241250
CSS2222

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity12.70
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces13
Interfaces4
Traits0
Classes40
▷ Abstract classes25.00%
▷ Concrete classes3895.00%
▷ Final classes00.00%
Methods407
▷ Static methods194.67%
▷ Public methods33181.33%
▷ Protected methods6716.46%
▷ Private methods92.21%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants64
▷ Global constants00.00%
▷ Class constants64100.00%
▷ Public constants64100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin