73% cycles

Code Review | Cycles

WordPress plugin Cycles scored73%from 54 tests.

About plugin

  • Plugin page: cycles
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 6
  • Update frequency: every 3.2 days
  • Top authors: cycles (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.43ms] Passed 4 tests

A check of server-side resources used by Cycles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.94 ▲0.92
Dashboard /wp-admin3.37 ▲0.0751.63 ▼5.51
Posts /wp-admin/edit.php3.48 ▲0.1346.91 ▼5.20
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.86 ▼7.68
Media Library /wp-admin/upload.php3.29 ▲0.0741.28 ▲0.68
Cycles /wp-admin/options-general.php?page=cycles3.2935.54

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cycles
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.26 ▲0.021.67 ▲0.0042.54 ▲0.31
Dashboard /wp-admin2,232 ▲325.85 ▼0.16105.85 ▼10.0943.69 ▼2.03
Posts /wp-admin/edit.php2,108 ▲52.00 ▼0.0336.84 ▼7.0136.54 ▼4.29
Add New Post /wp-admin/post-new.php1,533 ▼1323.09 ▼0.33634.69 ▼24.9960.33 ▲7.01
Media Library /wp-admin/upload.php1,411 ▲144.22 ▼0.0299.75 ▼34.8444.89 ▼9.86
Cycles /wp-admin/options-general.php?page=cycles9901.7625.5532.94

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=cycles
    • > Notice in wp-content/plugins/cycles/views/settings.php+111
    Undefined property: Cycles::$plugin
    • > GET request to /wp-admin/options-general.php?page=cycles
    • > Notice in wp-content/plugins/cycles/views/settings.php+111
    Trying to get property 'name' of non-object
    • > GET request to /wp-admin/options-general.php?page=cycles
    • > Notice in wp-content/plugins/cycles/views/settings.php+178
    Undefined index: ihaf_roles

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cycles/admin/partials/cycles-admin-display.php
    • > /wp-content/plugins/cycles/public/partials/cycles-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cycles/views/settings.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
The official readme.txt is a good inspiration

cycles/cycles.php Passed 13 tests

The main PHP script in "Cycles" version 1.1 is automatically included on every request by WordPress
91 characters long description:
Embeds the Cycles project script into your website, enabling visual feedback and approvals.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin444 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13170573438
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin