84% cmp

Code Review | CaptureMyPage

WordPress plugin CaptureMyPage scored84%from 54 tests.

About plugin

  • Plugin page: cmp
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 6.3.1
  • First release: Aug 6, 2015
  • Latest release: Aug 6, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: lonalore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,219 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.96ms] Passed 4 tests

Analyzing server-side resources used by CaptureMyPage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.72 ▼2.89
Dashboard /wp-admin3.31 ▲0.0149.22 ▼5.15
Posts /wp-admin/edit.php3.36 ▲0.0148.10 ▼1.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.57 ▼12.89
Media Library /wp-admin/upload.php3.23 ▲0.0135.17 ▼2.89

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for CaptureMyPage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.17 ▼0.241.85 ▲0.0146.84 ▲2.88
Dashboard /wp-admin2,211 ▲315.61 ▼0.0688.35 ▼10.2739.60 ▼8.52
Posts /wp-admin/edit.php2,113 ▲132.00 ▲0.0642.09 ▲5.9635.82 ▲0.76
Add New Post /wp-admin/post-new.php1,541 ▲1523.20 ▲0.09696.23 ▲25.8563.21 ▲9.65
Media Library /wp-admin/upload.php1,413 ▲164.23 ▲0.09102.65 ▼4.6943.18 ▲1.25

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cmp/cmp.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === cmp === )
  • Screenshots: Please add images for these screenshots: #1 (Just put in the URL and click "Create Screenshot".), #2 (The image is saved to your media library. You may customize the image and insert to your post.)
You can look at the official readme.txt

cmp/cmp.php Passed 13 tests

This is the main PHP file of "CaptureMyPage" 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
95 characters long description:
This plugin allows user to create a website screenshot in the content using only a website URL.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected594 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP198206594

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity75.00
▷ Minimum class complexity75.00
▷ Maximum class complexity75.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png120.16KB43.68KB▼ 63.64%
screenshot-1.png69.80KB24.29KB▼ 65.20%