89% productviewer

Code Review | ProductViewer

WordPress plugin ProductViewer scored89%from 54 tests.

About plugin

  • Plugin page: productviewer
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Apr 12, 2022
  • Latest release: Jun 22, 2022
  • Number of updates: 3
  • Update frequency: every 23.7 days
  • Top authors: ofeknakar01 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,378 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.57ms] Passed 4 tests

A check of server-side resources used by ProductViewer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.48 ▲4.33
Dashboard /wp-admin3.36 ▲0.0147.96 ▼10.38
Posts /wp-admin/edit.php3.41 ▲0.0545.71 ▼0.09
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.87 ▼10.01
Media Library /wp-admin/upload.php3.28 ▲0.0535.13 ▼1.79

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 19 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

Checking browser requirements for ProductViewer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.39 ▲0.181.68 ▲0.0443.38 ▼11.14
Dashboard /wp-admin2,198 ▲185.61 ▼0.0692.97 ▲6.6244.07 ▲0.22
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0034.01 ▼3.1535.64 ▼0.32
Add New Post /wp-admin/post-new.php1,526 ▼023.13 ▼0.39599.68 ▼93.3955.05 ▼8.12
Media Library /wp-admin/upload.php1,397 ▼34.20 ▼0.0195.94 ▼14.7341.45 ▼4.83

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

productviewer/productViewer.php 85% from 13 tests

The entry point to "ProductViewer" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("productviewer.php" instead of "productViewer.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin33,181 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript810,3922,11832,602
PHP112628279
CSS2111265
SVG20035

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon.png3.28KB1.83KB▼ 44.15%
css/LogoW.png7.06KB3.81KB▼ 45.97%
css/LogoD.png8.19KB3.86KB▼ 52.84%