79% wp-record

Code Review | WP-Record

WordPress plugin WP-Record scored 79% from 54 tests.

About plugin

  • Plugin page: wp-record
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.8.1
  • First release: Jan 19, 2018
  • Latest release: Feb 1, 2018
  • Number of updates: 8
  • Update frequency: every 1.8 days
  • Top authors: victorcruz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 555 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.15MB] [CPU: ▼131.39ms] Passed 4 tests

Server-side resources used by WP-Record
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.2534.60 ▲12.25
Dashboard /wp-admin3.19 ▲0.1447.63 ▲10.29
Posts /wp-admin/edit.php3.30 ▲0.2049.99 ▲9.93
Add New Post /wp-admin/post-new.php5.55 ▲0.11101.34 ▼549.32
Media Library /wp-admin/upload.php3.14 ▲0.1336.62 ▲3.56

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 91 new files
Database: no new tables, 1 new option
New WordPress options
wp-record-id

Browser metrics Passed 4 tests

Checking browser requirements for WP-Record
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲23617.19 ▲1.5514.67 ▲2.9548.82 ▼5.03
Dashboard /wp-admin2,985 ▲547.16 ▲1.00148.82 ▼6.84105.92 ▼7.24
Posts /wp-admin/edit.php2,781 ▲423.46 ▲0.7477.18 ▲9.15103.50 ▲17.19
Add New Post /wp-admin/post-new.php6,970 ▲5,28728.68 ▲9.891,200.86 ▲796.50141.10 ▲32.20
Media Library /wp-admin/upload.php1,846 ▲985.79 ▲0.78146.86 ▼8.96113.25 ▼1.87

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • wp-record-id

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-record/public/partials/wp-record-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Record_Admin' not found in wp-content/plugins/wp-record/admin/partials/wp-record-admin-display-meta-box.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: posts record, voice recorder

wp-record/wp-record.php Passed 13 tests

The entry point to "WP-Record" version 0.1.0 is a PHP file that has certain tags in its header comment area
55 characters long description:
Record your voice in the post, give voice to your page.

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 plugin68,365 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript133,89734,83360,208
TypeScript67074,1625,078
SVG1032,370
PHP14208697516
Markdown3290129
JSON50040
CSS622821
LESS1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.75
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3786.05%
▷ Protected methods00.00%
▷ Private methods613.95%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png12.54KB5.71KB▼ 54.46%
assets/screenshot-2.png178.19KB72.56KB▼ 59.28%
assets/screenshot-3.png59.39KB21.45KB▼ 63.88%