84% focus-videos

Code Review | Focus Videos

WordPress plugin Focus Videos scored84%from 54 tests.

About plugin

  • Plugin page: focus-videos
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.6
  • WordPress version: 6.3.1
  • First release: Oct 4, 2016
  • Latest release: Oct 4, 2016
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: gpriday (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /16,035 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Focus Videos
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.27 ▼16.68
Dashboard /wp-admin3.31 ▲0.0052.45 ▲2.26
Posts /wp-admin/edit.php3.36 ▲0.0049.42 ▲0.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.28 ▼13.22
Media Library /wp-admin/upload.php3.23 ▲0.0035.35 ▲5.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Focus Videos
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.38 ▼0.022.19 ▲0.1545.73 ▼8.07
Dashboard /wp-admin2,192 ▲185.62 ▼0.0082.11 ▼11.2841.98 ▲1.98
Posts /wp-admin/edit.php2,097 ▼31.98 ▲0.0137.12 ▲0.4132.06 ▼4.52
Add New Post /wp-admin/post-new.php6,430 ▲4,89318.77 ▲0.66877.58 ▲242.8064.94 ▲0.81
Media Library /wp-admin/upload.php1,400 ▲34.22 ▼0.0295.70 ▼9.2943.26 ▼1.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/focus-videos/focus-videos.php:29

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 Passed 29 tests

readme.txt Passed 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
1 plugin tags: video

focus-videos/focus-videos.php Passed 13 tests

The principal PHP file in "Focus Videos" v. 1.1 is loaded by WordPress automatically on each request
46 characters long description:
A plugin for setting the video in Focus theme.

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
There were no executable files found in this plugin134 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1133185
JavaScript19842
Markdown1607

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
PNG images were not found in this plugin