84% candifly

Code Review | Candifly

WordPress plugin Candifly scored84%from 54 tests.

About plugin

  • Plugin page: candifly
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: May 26, 2022
  • Latest release: Nov 8, 2022
  • Number of updates: 10
  • Update frequency: every 16.6 days
  • Top authors: candifly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,076 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.45MB] [CPU: ▼13.71ms] Passed 4 tests

Server-side resources used by Candifly
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1945.39 ▲4.49
Dashboard /wp-admin3.58 ▲0.2852.96 ▲4.90
Posts /wp-admin/edit.php3.63 ▲0.2855.13 ▲0.71
Add New Post /wp-admin/post-new.php3.40 ▼2.4939.24 ▼64.64
Media Library /wp-admin/upload.php3.44 ▲0.2141.25 ▲4.59

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 205 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Candifly
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10314.41 ▼0.171.63 ▼0.4344.94 ▲3.91
Dashboard /wp-admin2,259 ▲685.81 ▲0.8997.57 ▼4.2140.28 ▼6.18
Posts /wp-admin/edit.php2,138 ▲462.06 ▲0.0639.45 ▼2.2232.97 ▼4.29
Add New Post /wp-admin/post-new.php1,543 ▲1023.32 ▲0.31670.49 ▲31.8156.71 ▲2.06
Media Library /wp-admin/upload.php1,435 ▲564.22 ▼0.0299.46 ▼2.2043.76 ▼2.66

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 52× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/candifly/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/candifly/vendor/guzzlehttp/psr7/src/AppendStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/candifly/vendor/guzzlehttp/psr7/src/Request.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\MessageFormatterInterface' not found in wp-content/plugins/candifly/vendor/guzzlehttp/guzzle/src/MessageFormatter.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/candifly/vendor/guzzlehttp/psr7/src/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/candifly/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/candifly/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/candifly/vendor/guzzlehttp/guzzle/src/Pool.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/candifly/vendor/guzzlehttp/psr7/src/BufferStream.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/candifly/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

candifly/candifly.php Passed 13 tests

The main PHP script in "Candifly" version 1.0.6 is automatically included on every request by WordPress
55 characters long description:
Easily integrate your Candifly calendars into WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin17,097 lines of code in 177 files:
LanguageFilesBlank linesComment linesLines of code
PHP1382,3006,39911,266
Markdown171,34403,935
JSON11001,136
HTML4320370
JavaScript32572233
CSS180132
SVG1009
make1409
YAML1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity12.91
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces15
Interfaces26
Traits3
Classes94
▷ Abstract classes11.06%
▷ Concrete classes9398.94%
▷ Final classes3537.63%
Methods812
▷ Static methods16720.57%
▷ Public methods67282.76%
▷ Protected methods40.49%
▷ Private methods13616.75%
Functions124
▷ Named functions3427.42%
▷ Anonymous functions9072.58%
Constants74
▷ Global constants810.81%
▷ Class constants6689.19%
▷ Public constants5278.79%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/skins/pillscitrine.png6.65KB3.21KB▼ 51.76%
img/skins/tilesquartz.png3.34KB2.50KB▼ 25.38%
img/skins/classicsalmon.png8.95KB4.33KB▼ 51.61%
img/skins/pillscoralblue.png6.39KB3.55KB▼ 44.51%
img/skins/pillsorangeandteal.png6.56KB3.54KB▼ 46.10%