83% code-view

Code Review | Code View

WordPress plugin Code View scored83%from 54 tests.

About plugin

  • Plugin page: code-view
  • Plugin version: 0.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.3-4.9
  • WordPress version: 6.3.1
  • First release: Feb 4, 2018
  • Latest release: Feb 7, 2018
  • Number of updates: 12
  • Update frequency: every 0.3 days
  • Top authors: zach2825 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.36ms] Passed 4 tests

Analyzing server-side resources used by Code View
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.40 ▲0.33
Dashboard /wp-admin3.35 ▲0.0046.47 ▼11.60
Posts /wp-admin/edit.php3.40 ▲0.0442.49 ▼2.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.50 ▼15.38
Media Library /wp-admin/upload.php3.27 ▲0.0434.53 ▲0.80
CodeView Settings /wp-admin/options-general.php?page=codeview3.2533.22

Server storage [IO: ▲0.52MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Code View
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16114.05 ▼0.517.08 ▲5.4843.69 ▲4.05
Dashboard /wp-admin2,211 ▲375.84 ▲0.2885.42 ▼2.6037.11 ▼2.87
Posts /wp-admin/edit.php2,123 ▲232.37 ▲0.3641.49 ▲5.2432.68 ▼3.28
Add New Post /wp-admin/post-new.php1,539 ▲1123.97 ▲0.99624.66 ▲11.6633.81 ▼19.49
Media Library /wp-admin/upload.php1,413 ▲104.49 ▲0.3393.61 ▼1.9540.72 ▼0.62
CodeView Settings /wp-admin/options-general.php?page=codeview1,4382.1644.3650.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
Even though no errors were found, 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
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/code-view/code-view/code-view.php:54
    • > PHP Fatal error
      Uncaught Error: Class 'CodeView' not found in wp-content/plugins/code-view/pages/code.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/code-view/code-view.php:250
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/code-view/pages/settings-page.php:9

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Donate link: Invalid URI found ("")
  • Screenshots: A description for screenshot #1 is missing in code-view/assets to your readme.txt
The official readme.txt is a good inspiration

code-view/code-view.php 92% from 13 tests

Analyzing the main PHP file in "Code View" version 0.0.5
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected6,639 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
CSS819965854,782
Markdown353811,399
PHP56590299
SVG11165
JavaScript59148
LESS211046

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity4.00
▷ Maximum class complexity6.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions1
▷ Named functions1100.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
6 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
code-view/assets/highlight/styles/brown-papersq.png17.77KB9.92KB▼ 44.16%
screenshot-on-the-post.png26.61KB7.46KB▼ 71.95%
code-view/screenshot-on-the-post.png26.61KB7.46KB▼ 71.95%
assets/highlight/styles/brown-papersq.png17.77KB9.92KB▼ 44.16%
code-view/assets/highlight/styles/school-book.png0.47KB0.34KB▼ 27.37%