84% wp-couch-mode

Code Review | WP Couch Mode

WordPress plugin WP Couch Mode scored84%from 54 tests.

About plugin

  • Plugin page: wp-couch-mode
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-4.0
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Sep 23, 2014
  • Number of updates: 37
  • Update frequency: every 0.4 days
  • Top authors: ritesh1991 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,811 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WP Couch Mode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.46 ▲4.82
Dashboard /wp-admin3.34 ▼0.0145.41 ▼13.03
Posts /wp-admin/edit.php3.39 ▲0.0348.60 ▲3.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.80 ▼19.18
Media Library /wp-admin/upload.php3.26 ▲0.0334.42 ▲1.85
Read Mode Settings /wp-admin/options-general.php?page=wp-couch-mode/wp-couch-mode.php3.2331.89

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 9 new options
New WordPress options
wpcm_resize_popup
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
wpcm_readm_mode_link
widget_recent-posts
db_upgraded
wpcm_read_mode_text

Browser metrics Passed 4 tests

WP Couch Mode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.15 ▼1.164.78 ▲2.9343.57 ▲3.63
Dashboard /wp-admin2,213 ▲255.86 ▼0.0597.41 ▼14.4736.23 ▼4.91
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0138.59 ▼3.7134.87 ▼1.23
Add New Post /wp-admin/post-new.php1,547 ▲2818.64 ▼4.37589.13 ▼87.8057.95 ▼3.08
Media Library /wp-admin/upload.php1,395 ▲74.22 ▼0.0294.38 ▼15.2843.59 ▼6.73
Read Mode Settings /wp-admin/options-general.php?page=wp-couch-mode/wp-couch-mode.php8532.0422.3927.50

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
These items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • wpcm_readm_mode_link
    • can_compress_scripts
    • wpcm_read_mode_text
    • wpcm_resize_popup
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-couch-mode/wp-couch-mode.php:28

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: simple read post, popup post, post, read post, couch mode...

wp-couch-mode/wp-couch-mode.php Passed 13 tests

The entry point to "WP Couch Mode" version 1.3 is a PHP file that has certain tags in its header comment area
93 characters long description:
WP Couch Mode lets you get a Clean or Simple Reading mode for post in your WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected406 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS172189
PHP13721153
JavaScript18651
SVG11013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected