10% reposidget-for-coding

Code Review | Reposidget For Coding ( Coding 项目挂件 )

WordPress plugin Reposidget For Coding ( Coding 项目挂件 ) scored10%from 54 tests.

About plugin

  • Plugin page: reposidget-for-co...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.1.0
  • WordPress version: 6.3.1
  • First release: Feb 4, 2015
  • Latest release: Feb 12, 2015
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: PCDotFan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /854 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/reposidget-for-coding/reposidget-for-coding.php+11
    Use of undefined constant CODING_HOMEPAGE - assumed 'CODING_HOMEPAGE' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.42ms] Passed 4 tests

A check of server-side resources used by Reposidget For Coding ( Coding 项目挂件 )
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.95 ▼37.26
Dashboard /wp-admin2.05 ▼1.264.92 ▼39.81
Posts /wp-admin/edit.php2.05 ▼1.315.35 ▼41.41
Add New Post /wp-admin/post-new.php2.05 ▼3.845.91 ▼91.21
Media Library /wp-admin/upload.php2.05 ▼1.185.16 ▼25.80

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Reposidget For Coding ( Coding 项目挂件 )
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲12214.79 ▲0.501.71 ▼0.5241.39 ▼0.71
Dashboard /wp-admin2,261 ▲704.89 ▼1.00110.11 ▲6.0041.23 ▼2.59
Posts /wp-admin/edit.php2,091 ▲22.04 ▲0.0340.63 ▲4.1736.06 ▲3.23
Add New Post /wp-admin/post-new.php1,580 ▲4623.06 ▼0.14630.51 ▼44.3054.80 ▲5.08
Media Library /wp-admin/upload.php1,393 ▲54.22 ▲0.0697.21 ▼3.0240.46 ▼3.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/reposidget-for-coding/reposidget-for-coding.php+11
    Use of undefined constant CODING_HOMEPAGE - assumed 'CODING_HOMEPAGE' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant CODING_HOMEPAGE - assumed 'CODING_HOMEPAGE' (this will throw an Error in a future version of PHP) in wp-content/plugins/reposidget-for-coding/reposidget-for-coding.php on line 11
    • > PHP Warning
      Use of undefined constant CODING_USERAGENT - assumed 'CODING_USERAGENT' (this will throw an Error in a future version of PHP) in wp-content/plugins/reposidget-for-coding/reposidget-for-coding.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/reposidget-for-coding/reposidget-for-coding.php:143
    • > PHP Warning
      Use of undefined constant CODING_CODING - assumed 'CODING_CODING' (this will throw an Error in a future version of PHP) in wp-content/plugins/reposidget-for-coding/reposidget-for-coding.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Use shortcode to insert reposidget into the post/page.), #2 (The look of a reposidget.), #3 (Looks so nice!)
Please take inspiration from this readme.txt

reposidget-for-coding/reposidget-for-coding.php 92% from 13 tests

The primary PHP file in "Reposidget For Coding ( Coding 项目挂件 )" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin656 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS2370299
JavaScript4206120
PHP1219119
PO File1253065
HTML20037
SVG10016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot.png32.58KB16.50KB▼ 49.37%
logo.png13.24KB3.44KB▼ 73.98%