67% fitness-calendar

Code Review | Fitness Calendar

WordPress plugin Fitness Calendar scored67%from 54 tests.

About plugin

  • Plugin page: fitness-calendar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.5.2
  • WordPress version: 6.3.1
  • First release: May 19, 2016
  • Latest release: May 19, 2016
  • Number of updates: 16
  • Update frequency: every 0.1 days
  • Top authors: worldwidewebsolution.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,105 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼33.24ms] Passed 4 tests

Analyzing server-side resources used by Fitness Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2848.98 ▲7.28
Dashboard /wp-admin3.12 ▼0.2223.85 ▼33.36
Posts /wp-admin/edit.php3.13 ▼0.2324.82 ▼23.78
Add New Post /wp-admin/post-new.php3.12 ▼2.7627.04 ▼67.47
Media Library /wp-admin/upload.php3.12 ▼0.1025.58 ▼8.33
Add New /wp-admin/admin.php?page=add-new3.1324.96
Listing /wp-admin/admin.php?page=calendar-plugin3.1323.14

Server storage [IO: ▲0.90MB] [DB: ▲0.31MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
jal_db_version
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Fitness Calendar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22013.59 ▼1.069.55 ▲7.7634.93 ▼7.80
Dashboard /wp-admin2,243 ▲585.86 ▼0.02101.81 ▲1.0647.40 ▲6.38
Posts /wp-admin/edit.php2,129 ▲402.04 ▲0.0441.54 ▼0.6043.85 ▲5.37
Add New Post /wp-admin/post-new.php1,398 ▼13021.65 ▲3.34534.13 ▼67.6036.36 ▼26.58
Media Library /wp-admin/upload.php1,431 ▲434.30 ▲0.1197.54 ▲2.6042.54 ▲0.27
Add New /wp-admin/admin.php?page=add-new1,4771.6828.2442.57
Listing /wp-admin/admin.php?page=calendar-plugin1,0942.0427.3538.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • jal_db_version
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=calendar-plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+632
    Undefined index: nonce
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+808
    Undefined index: description
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+823
    Undefined index: video_title1
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+829
    Undefined index: video1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+921
    Undefined index: set1
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+839
    Undefined index: rep1
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+844
    Undefined index: description1
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+850
    Undefined index: video_title2
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+856
    Undefined index: video2
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+861
    Undefined index: set2
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+866
    Undefined index: rep2
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+871
    Undefined index: description2
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+878
    Undefined index: video_title3
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+884
    Undefined index: video3
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+889
    Undefined index: set3
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+894
    Undefined index: rep3
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+899
    Undefined index: description3
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+905
    Undefined index: video_title4
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+911
    Undefined index: video4
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+916
    Undefined index: rep4
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+926
    Undefined index: description4
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+932
    Undefined index: video_title5
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+938
    Undefined index: video5
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+943
    Undefined index: set5
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+948
    Undefined index: rep5
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+953
    Undefined index: description5
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+959
    Undefined index: video_title6
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+965
    Undefined index: video6
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+970
    Undefined index: set6
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+975
    Undefined index: rep6
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+980
    Undefined index: description6
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+987
    Undefined index: video_title7
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+993
    Undefined index: video7
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+998
    Undefined index: set7
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+1003
    Undefined index: rep7
    • > GET request to /wp-admin/admin.php?page=add-new
    • > Notice in wp-content/plugins/fitness-calendar/calendar-plugin.php+1008
    Undefined index: description7

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fitness-calendar/calendar-plugin.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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: These screenshots require images: #1 (you can see plugin menu in admin bar as shown in screenshot-1.), #2 (You can add videos through add new video form as shown in screenshot-2.), #3 (you can add upto 7 featured videos with one main video as shown in screenshot-3.), #4 (You can see featured videos with title sets and reps of workout in screenshot-4.), #5 (You can see video with week title , video title , rest time , equipments etc in screenshot-5.)
You can look at the official readme.txt

fitness-calendar/calendar-plugin.php 85% from 13 tests

The main PHP script in "Fitness Calendar" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("fitness-calendar.php" instead of "calendar-plugin.php")
  • Description: The description should be shorter than 140 characters (currently 180 characters long)

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
Everything looks great! No dangerous files found in this plugin1,066 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1810113907
CSS11010137
JavaScript16122

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.85MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png18.80KB10.61KB▼ 43.54%
assets/screenshot-1.png19.97KB12.14KB▼ 39.20%
assets/screenshot-5.png579.29KB136.52KB▼ 76.43%
assets/screenshot-4.png227.88KB54.54KB▼ 76.06%
assets/screenshot-3.png22.44KB12.94KB▼ 42.31%