84% cipher

Code Review | Cipher

WordPress plugin Cipher scored84%from 54 tests.

About plugin

  • Plugin page: cipher
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2012
  • Latest release: Mar 26, 2023
  • Number of updates: 26
  • Update frequency: every 145.1 days
  • Top authors: _luigi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,276 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.79ms] Passed 4 tests

An overview of server-side resources used by Cipher
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.13 ▼8.08
Dashboard /wp-admin3.33 ▲0.0247.25 ▼5.22
Posts /wp-admin/edit.php3.44 ▲0.0953.34 ▼0.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.25 ▼13.71
Media Library /wp-admin/upload.php3.25 ▲0.0235.60 ▼4.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Cipher
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.13 ▼0.241.87 ▲0.0841.70 ▼2.42
Dashboard /wp-admin2,192 ▲155.56 ▼0.0295.56 ▲1.0841.12 ▲0.72
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0543.15 ▲6.3536.15 ▲0.47
Add New Post /wp-admin/post-new.php1,540 ▲1418.22 ▼4.97625.00 ▼17.4148.67 ▼6.34
Media Library /wp-admin/upload.php1,397 ▼64.11 ▼0.08104.71 ▼2.5543.02 ▼6.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'cipher\\Plugin' not found in wp-content/plugins/cipher/core/cipher.class.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: code, preformatted, backticks, comment, snippet

cipher/cipher.php Passed 13 tests

The primary PHP file in "Cipher" version 1.2.2 is used by WordPress to initiate all plugin functionality
57 characters long description:
Cipher allows commenters to publish (pre-formatted) code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected219 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP488260219

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.00
▷ Minimum class complexity3.00
▷ Maximum class complexity22.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes2100.00%
Methods25
▷ Static methods312.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin