84% amateur-tv

Code Review | amateur tv

WordPress plugin amateur tv scored84%from 54 tests.

About plugin

  • Plugin page: amateur-tv
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: May 2, 2023
  • Number of updates: 5
  • Update frequency: every 26.6 days
  • Top authors: JavierCasares (60%)amateurtv (60%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /823 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼11.24ms] Passed 4 tests

Server-side resources used by amateur tv
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.22 ▼1.78
Dashboard /wp-admin3.42 ▲0.0747.32 ▼20.11
Posts /wp-admin/edit.php3.53 ▲0.1852.58 ▼0.41
Add New Post /wp-admin/post-new.php6.01 ▲0.1285.87 ▼22.65
Media Library /wp-admin/upload.php3.34 ▲0.1136.49 ▲0.10
Amateur TV /wp-admin/options-general.php?page=amateurtv_header3.3132.48

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

amateur tv: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.59 ▼1.091.82 ▼0.1939.20 ▼3.63
Dashboard /wp-admin2,213 ▲255.85 ▼0.00102.28 ▼9.5339.39 ▼2.76
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0439.29 ▲2.0135.53 ▼1.07
Add New Post /wp-admin/post-new.php6,366 ▲4,84622.66 ▼0.66834.25 ▲185.6360.62 ▲9.44
Media Library /wp-admin/upload.php1,389 ▲14.17 ▼0.1994.50 ▼4.0541.18 ▼3.87
Amateur TV /wp-admin/options-general.php?page=amateurtv_header7852.0626.6525.65

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

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/amateur-tv/includes/camlist.php
    • > /wp-content/plugins/amateur-tv/includes/iframe.php
    • > /wp-content/plugins/amateur-tv/includes/admin.php
    • > /wp-content/plugins/amateur-tv/amateur-tv.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: amateur, cams, adult, webcam, cam...

amateur-tv/amateur-tv.php Passed 13 tests

The entry point to "amateur tv" version 1.2.0 is a PHP file that has certain tags in its header comment area
117 characters long description:
Create your own amateur cam affiliate site, thanks to amateur.tv. Online cams feed and live cams viewer ready to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected29,076 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JSON40027,757
JavaScript65487795
PHP583145300
Sass2170117
PO File13939105
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity27.00
▷ Minimum class complexity16.00
▷ Maximum class complexity38.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.22MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png11.22KB5.74KB▼ 48.88%
assets/banner-772x250.png167.66KB51.60KB▼ 69.22%
assets/icon-256x256.png43.33KB22.07KB▼ 49.08%