84% wordpen

Code Review | WordPen

WordPress plugin WordPen scored84%from 54 tests.

About plugin

  • Plugin page: wordpen
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 21, 2017
  • Latest release: Mar 21, 2017
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: deployer (66.67%)gingersoulrecords (66.67%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,117 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.11MB] [CPU: ▼6.74ms] Passed 4 tests

Server-side resources used by WordPen
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.20 ▼1.76
Dashboard /wp-admin3.43 ▲0.0950.95 ▼13.37
Posts /wp-admin/edit.php3.55 ▲0.1949.11 ▲1.13
Add New Post /wp-admin/post-new.php6.04 ▲0.1585.13 ▼12.26
Media Library /wp-admin/upload.php3.36 ▲0.1335.01 ▲0.45
All WordPens /wp-admin/edit.php?post_type=wordpen3.4038.72
Add New /wp-admin/post-new.php?post_type=wordpen3.3946.53

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WordPen
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.59 ▲0.192.12 ▲0.4044.85 ▲2.60
Dashboard /wp-admin2,220 ▲435.07 ▼0.4592.53 ▼1.6690.49 ▲45.74
Posts /wp-admin/edit.php2,140 ▲432.51 ▲0.4939.43 ▲1.3534.10 ▼3.66
Add New Post /wp-admin/post-new.php1,563 ▲3523.25 ▼0.03670.71 ▼16.0737.75 ▼23.60
Media Library /wp-admin/upload.php1,440 ▲374.62 ▲0.3599.61 ▼5.6182.10 ▲35.53
All WordPens /wp-admin/edit.php?post_type=wordpen1,1142.4633.8329.12
Add New /wp-admin/post-new.php?post_type=wordpen1,7193.2564.0370.13

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpen/wordpen.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: codepen, snippets

wordpen/wordpen.php Passed 13 tests

This is the main PHP file of "WordPen" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
Embed pens from CodePen without the 'edit' frame

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin93,937 lines of code in 552 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2977,2515,49763,893
HTML1823,7631122,481
PHP37044164,037
CSS634412502,478
Markdown33840812
SVG111179
JSON10048
Bourne Shell1015
YAML1004

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity117.25
▷ Minimum class complexity1.00
▷ Maximum class complexity467.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods254
▷ Static methods3714.57%
▷ Public methods6826.77%
▷ Protected methods18472.44%
▷ Private methods20.79%
Functions0
▷ Named functions00.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
5 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png61.81KB25.12KB▼ 59.37%
icon.png0.87KB0.82KB▼ 4.97%
js/codemirror/doc/logo.png9.09KB4.10KB▼ 54.95%
js/codemirror/doc/yinyang.png4.52KB2.03KB▼ 55.19%
screenshot-2.png88.85KB36.09KB▼ 59.38%