84% foureyes

Code Review | FourEyes

WordPress plugin FourEyes scored84%from 54 tests.

About plugin

  • Plugin page: foureyes
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.7
  • WordPress version: 6.3.1
  • First release: Jul 29, 2015
  • Latest release: Dec 9, 2016
  • Number of updates: 11
  • Update frequency: every 45.6 days
  • Top authors: sparklit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /993 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.73ms] Passed 4 tests

A check of server-side resources used by FourEyes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.27 ▲2.46
Dashboard /wp-admin3.32 ▲0.0259.60 ▲7.00
Posts /wp-admin/edit.php3.37 ▲0.0152.62 ▼0.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.65 ▼19.80
Media Library /wp-admin/upload.php3.24 ▲0.0139.05 ▲2.64
FourEyes /wp-admin/plugins.php?page=foureyes3.2132.85

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for FourEyes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▲0.141.70 ▼0.4343.98 ▲1.48
Dashboard /wp-admin2,202 ▲225.66 ▲0.0683.98 ▼8.5039.91 ▼2.99
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0137.27 ▲0.4434.63 ▼1.29
Add New Post /wp-admin/post-new.php1,554 ▲1323.41 ▲5.20683.34 ▲62.7060.13 ▲0.71
Media Library /wp-admin/upload.php1,398 ▼24.20 ▼0.0397.73 ▼9.6144.15 ▼2.75
FourEyes /wp-admin/plugins.php?page=foureyes8332.1723.9732.55

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/foureyes/config.php

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (First screenshot) image missing
Please take inspiration from this readme.txt

foureyes/foureyes.php Passed 13 tests

Analyzing the main PHP file in "FourEyes" version 1.0.1
82 characters long description:
FourEyes survey plugin - Embed FourEyes surveys directly onto your Wordpress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected136 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32730136

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods266.67%
▷ Protected methods133.33%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png68.43KB20.11KB▼ 70.61%