10% tufftufftime

Code Review | TuffTuffTime

WordPress plugin TuffTuffTime scored 10% from 54 tests.

About plugin

  • Plugin page: tufftufftime
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2016
  • Latest release: Oct 14, 2016
  • Number of updates: 5
  • Update frequency: every 18.6 days
  • Top authors: WheresMarco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 554 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/tufftufftime/tufftufftime.php+37
    require(wp-content/plugins/tufftufftime/includes/class-TuffTuffTime.php): failed to open stream: No such file or directory

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

A check of server-side resources used by TuffTuffTime
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0056.55 ▲17.83
Dashboard /wp-admin3.31 ▲0.0042.59 ▼3.31
Posts /wp-admin/edit.php3.36 ▲0.0046.46 ▼1.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.93 ▼8.70
Media Library /wp-admin/upload.php3.23 ▲0.0033.19 ▼0.36

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TuffTuffTime
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.80 ▲0.512.27 ▲0.4452.56 ▲9.24
Dashboard /wp-admin2,206 ▲154.86 ▼0.0199.51 ▼5.9438.82 ▼3.41
Posts /wp-admin/edit.php2,086 ▼02.04 ▲0.0537.03 ▼0.6634.07 ▼4.58
Add New Post /wp-admin/post-new.php1,521 ▼823.04 ▲4.80665.86 ▲49.5959.35 ▲0.32
Media Library /wp-admin/upload.php1,385 ▼04.22 ▼0.0294.06 ▼3.2941.14 ▼4.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/tufftufftime/public/partials/tufftufftime-public-simple-timetable.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/tufftufftime/uninstall.php:32
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/tufftufftime/public/partials/tufftufftime-public-simple-timetable.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/tufftufftime/admin/partials/tufftufftime-admin-options.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tufftufftime/public/partials/tufftufftime-public-simple-timetable.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'TuffTuffTime' not found in wp-content/plugins/tufftufftime/public/class-tufftufftime-public.php:23

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Example of output when using the shortcode.)
The official readme.txt is a good inspiration

tufftufftime/tufftufftime.php 92% from 13 tests

The main file in "TuffTuffTime" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

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 detected478 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10175484383
PO File1171977
Markdown110018

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.15
Average class complexity4.20
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.png71.08KB19.63KB▼ 72.38%