78% codoc

Code Review | codoc

WordPress plugin codoc scored 78% from 54 tests.

About plugin

  • Plugin page: codoc
  • Plugin version: 0.9.3.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 5.8.1
  • First release: Aug 19, 2019
  • Latest release: Sep 28, 2021
  • Number of updates: 98
  • Update frequency: every 7.9 days
  • Top authors: codoc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 17,502 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼151.24ms] Passed 4 tests

A check of server-side resources used by codoc
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.05 ▲0.3343.32 ▲22.53
Dashboard /wp-admin3.34 ▲0.2950.24 ▼9.27
Posts /wp-admin/edit.php3.39 ▲0.2948.55 ▲3.28
Add New Post /wp-admin/post-new.php5.64 ▲0.2182.86 ▼593.11
Media Library /wp-admin/upload.php3.22 ▲0.2230.35 ▼5.86
codoc /wp-admin/options-general.php?page=codoc3.2030.62

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 1 new option
New WordPress options
codoc_settings

Browser metrics Passed 4 tests

codoc: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,736 ▲14016.27 ▲0.6511.58 ▲1.8242.84 ▼4.71
Dashboard /wp-admin2,977 ▲495.93 ▼0.01154.88 ▼13.09129.91 ▲16.71
Posts /wp-admin/edit.php2,746 ▲72.72 ▼0.0072.71 ▲4.3789.60 ▼2.25
Add New Post /wp-admin/post-new.php1,688 ▲516.23 ▼2.45499.57 ▲86.41128.34 ▲21.03
Media Library /wp-admin/upload.php1,814 ▲75.03 ▼0.01177.54 ▲11.35127.63 ▼3.19
codoc /wp-admin/options-general.php?page=codoc1,0562.0556.68122.07

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • codoc_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/codoc/views/codoc-injector.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/codoc/views/codoc-injector.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/codoc/views/codoc-shortcodes-list.php:9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/class-http.php' (include_path='.:/usr/share/php') in wp-content/plugins/codoc/class-codoc-util.php on line 11
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/codoc/views/codoc-injector.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/codoc/views/codoc-injector.php on line 1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/codoc/class-codoc-util.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/codoc/views/codoc-shortcodes-list.php on line 1
    • > PHP Notice
      Undefined variable: response in wp-content/plugins/codoc/views/codoc-shortcodes-list.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/codoc/views/codoc-injector.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/codoc/views/codoc-shortcodes-list.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3 in codoc/assets to your readme.txt
You can take inspiration from this readme.txt

codoc/codoc.php Passed 13 tests

The main file in "codoc" v. 0.9.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
114 characters long description:
有料記事の販売、サブスクリプション販売、投げ銭の仕組みをすぐに導入できます。

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
No dangerous file extensions were detected1,915 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP61061371,195
JavaScript66641465
CSS4372150
Sass36490
JSON10014
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity81.50
▷ Minimum class complexity65.00
▷ Maximum class complexity98.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions13.03%
▷ Anonymous functions3296.97%
Constants10
▷ Global constants220.00%
▷ Class constants880.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src_mce/more.png4.00KB1.37KB▼ 65.86%